Skip to content

PostgreSQL get sqlcode #4093

@omerbrandis

Description

@omerbrandis

hello all,

I've started using poco::data , v1.11.0. ( I seems like a wonderful lib, thanks for creating it ).

I seem to be unable to find a statements sqlcode.

at least when I use Poco::Data::PostgreSQL::PostgreSQLException, with postgresql v15.3
and have a failing insert statement with the following msg "the display text is "ERROR: null value in column "...l" of relation "..." violates not-null constraint" ,
the value returned by exception.code() is 0.
while I expected to see something like 23502.

so either this is a bug,
Or I am looking in the wrong place.

Please advise,
Omer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions