Re: [INTERFACES] libpq PQftype() to comprehend types?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [INTERFACES] libpq PQftype() to comprehend types?
Дата
Msg-id 22079.921203963@sss.pgh.pa.us
обсуждение исходный текст
Ответ на libpq PQftype() to comprehend types?  (Michael Olivier <mo@local2me.com>)
Список pgsql-interfaces
Michael Olivier <mo@local2me.com> writes:
> Can someone tell me how I can use PQftype() or some other mechanism to
> interpret a query result in terms of the data types of the columns?

The PQftype value is the OID of the row for the type in the system
pg_type catalog.  Try

    SELECT * FROM pg_type WHERE oid = <PQftype result>

BTW: oid's for the predefined types are consistent across installations,
but oid's for user-defined types are not (and shouldn't even be trusted
across a save/reload).

            regards, tom lane

В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Claudio Cicognani
Дата:
Сообщение: Looking for a software library
Следующее
От: "Ries van Twisk"
Дата:
Сообщение: Postgres and ODBC with MS-Access memory problem