Skip to content

Conversation

@devnexen
Copy link
Member

@devnexen devnexen commented May 2, 2023

No description provided.

@devnexen devnexen force-pushed the pgsql_errors_sqltate branch 2 times, most recently from cb832e5 to 39f2f8e Compare May 2, 2023 22:26
@llaville
Copy link

llaville commented Oct 10, 2023

Hello @devnexen , @Girgias

By reading source code, I think there is something strange in ext/pgsql/pgsql.stub.php (else code eq to then, except for @cvalue annotation)

See commit : f31d253#diff-c5961ea04ab805b0059964fac68d6e159095a4b56aaaded0b1b941b8768c0f52

Did I missed something (because I'm newbie on C source code) ?

PS: I saw it just now because I'm testing PHP 8.3.0RC3

@Girgias
Copy link
Member

Girgias commented Oct 10, 2023

This does seem fishy, thanks for catching this. @devnexen can you have a look?

@devnexen
Copy link
Member Author

It is because PQERRORS_SQLSTATE before postgresql 12 does not exist so it is set to zero in this case (aka PQERRORS_TERSE).

@llaville
Copy link

@devnexen Personnaly, as newbie, I think it's more readable and we understand it immediatly when you see code like it was done in posix extension => 69d49e4#diff-73d72baf3bc14af16429d09dd7b107372b931e50be5e6e4619f881e5c6721583R222-R228

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.

3 participants