Re: After upgrading libpq, the same function(PQftype) call returns a different OID
От | Sebastien Flaesch |
---|---|
Тема | Re: After upgrading libpq, the same function(PQftype) call returns a different OID |
Дата | |
Msg-id | DBAP191MB1289C92E15014C2627C49BEBB0D92@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM обсуждение исходный текст |
Ответ на | Re: After upgrading libpq, the same function(PQftype) call returns a different OID (Adrian Klaver <adrian.klaver@aklaver.com>) |
Ответы |
Re: After upgrading libpq, the same function(PQftype) call returns a different OID
|
Список | pgsql-general |
You are right Adrian, I did not search properly I found the header file here:
sf@toro:/opt3/dbs/pgs/17.4$ ls -l include/postgresql/server/catalog/pg_type_d.h
-rw-r--r-- 1 sf sf 9672 Mar 13 17:05 include/postgresql/server/catalog/pg_type_d.h
I was not expecting this file to be in a "server" folder, when it's to be used for client apps.
And still, I do not trust the content.
Seb
From: Adrian Klaver <adrian.klaver@aklaver.com>
Sent: Tuesday, March 18, 2025 7:41 PM
To: Sebastien Flaesch <sebastien.flaesch@4js.com>; Tom Lane <tgl@sss.pgh.pa.us>; M Tarkeshwar Rao <m.tarkeshwar.rao@ericsson.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: After upgrading libpq, the same function(PQftype) call returns a different OID
Sent: Tuesday, March 18, 2025 7:41 PM
To: Sebastien Flaesch <sebastien.flaesch@4js.com>; Tom Lane <tgl@sss.pgh.pa.us>; M Tarkeshwar Rao <m.tarkeshwar.rao@ericsson.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: After upgrading libpq, the same function(PQftype) call returns a different OID
EXTERNAL: Do not click links or open attachments if you do not recognize the sender.
On 3/16/25 02:30, Sebastien Flaesch wrote:
>
> Hello,
>
> I think the column type identification with PQftype() needs some
> review/clarification.
>
> It's a pity that libpq does not have an API to return directly the
> actual type name of a column.
>
> The doc
> <https://urldefense.com/v3/__https://www.postgresql.org/docs/17/libpq-exec.html*LIBPQ-PQFTYPE__;Iw!!I_DbfM1H!BrhvYoUAjZeszdg-ZMusy9M6WcTcHnTVpF22U_PzygM-UxQsQ0oa34TMFyp3Asr6-8L3nJQDSkUR9533wp_t-V3RsEXlNg$ > says:
>
> You can query the system table |pg_type| to obtain the names and
> properties of the various data types. *The OIDs of the built-in data
> types are defined in the file |catalog/pg_type_d.h| in the
> PostgreSQL installation's |include| directory.*
>
> After building PostgreSQL *17.4* from the sources, I cannot find this
> pg_type_d.h header file in the installation directory. Maybe I am
> missing some configure option?
Went I built from source in ended up in:
/usr/local/pgsql/include/server/catalog/
--
Adrian Klaver
adrian.klaver@aklaver.com
On 3/16/25 02:30, Sebastien Flaesch wrote:
>
> Hello,
>
> I think the column type identification with PQftype() needs some
> review/clarification.
>
> It's a pity that libpq does not have an API to return directly the
> actual type name of a column.
>
> The doc
> <https://urldefense.com/v3/__https://www.postgresql.org/docs/17/libpq-exec.html*LIBPQ-PQFTYPE__;Iw!!I_DbfM1H!BrhvYoUAjZeszdg-ZMusy9M6WcTcHnTVpF22U_PzygM-UxQsQ0oa34TMFyp3Asr6-8L3nJQDSkUR9533wp_t-V3RsEXlNg$ > says:
>
> You can query the system table |pg_type| to obtain the names and
> properties of the various data types. *The OIDs of the built-in data
> types are defined in the file |catalog/pg_type_d.h| in the
> PostgreSQL installation's |include| directory.*
>
> After building PostgreSQL *17.4* from the sources, I cannot find this
> pg_type_d.h header file in the installation directory. Maybe I am
> missing some configure option?
Went I built from source in ended up in:
/usr/local/pgsql/include/server/catalog/
--
Adrian Klaver
adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: