SOCI / soci

Official repository of the SOCI - The C++ Database Access Library
http://soci.sourceforge.net/
Boost Software License 1.0
1.37k stars 472 forks source link

"unknown data type with typelem" for PostgreSQL column with custom enum type #1031

Closed Thiesius closed 1 year ago

Thiesius commented 1 year ago

Soci Version: 4.0.3 PostgreSQL Version: 14 libpq version: 14.2 File: statement.cpp Line: On the screenshot

When querying data from table containing the "bad" column, an exception is thrown. State of the program at the throw location is on the screenshot. PQfsize returns 4 instead of -1 expected by the code.

The column is defined as limited_to_type generic.item_type. generic is also different schema than limited_to_type. The type is defined as CREATE TYPE generic.item_type AS ENUM ('val1'...);

image

Any idea how I could bypass this issue without modifying the database?

Thiesius commented 1 year ago

Seems like there has been some updates on the master regarding this issue since 4.0.3. I will test that and report

Thiesius commented 1 year ago

Seems to be working on current master.