Skip to content

Conversation

@petk
Copy link
Member

@petk petk commented Jun 9, 2024

The PG_VERSION_NUM is not available in intended public PostgreSQL headers unless the pg_config.h is included or the PostgreSQL server development headers are installed separately. This instead resorts to checking for the PGVerbosity enum value. The PQERRORS_SQLSTATE was added to PostgreSQL 12.0.

The PG_VERSION_NUM is not available in intended public PostgreSQL
headers unless the pg_config.h is included or the PostgreSQL server
development headers are installed separately. This instead resorts to
checking for the PGVerbosity enum value. The PQERRORS_SQLSTATE was added
to PostgreSQL 12.0.
Copy link
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true you needed the server bits, I forgot.

@petk
Copy link
Member Author

petk commented Jun 9, 2024

And on Windows, it is currently at version 11.4, so it's not defined there yet. I think this will work fine. Otherwise, it's quite problematic that to find out if some enum value is available entire compile test program needs to be done. There doesn't seem to be any AC_CHECK_ENUM macros :D

@petk petk merged commit 65ff511 into php:master Jun 9, 2024
@petk petk deleted the patch-PG_VERSION_NUM branch June 9, 2024 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants