On 3/20/25 00:17, Sebastien Flaesch wrote:
> Let's not deviate from my request:
>
> I have implemented various DB client modules using the C client APIs,
> for Oracle DB, SQL Server, IBM DB2, MySQL/MariaDB, SQLite and PostgreSQL.
>
> While I like PostgreSQL a lot, this is the only case where I have to
> define myself the column type ids, to implement a "describe column" feature.
>
> ODBC has SQLDescribeCol() / SQLDescribeColW() and predefined SQL_*
> constants like SQL_INTEGER, SQL_VARCHAR ...
>
> Native PostgreSQL built-in SQL types should be listed in a .h header of
> the C client API
>
You could borrow from here:
https://github.com/postgresql-interfaces/psqlodbc/blob/main/pgtypes.h
--
Adrian Klaver
adrian.klaver@aklaver.com