getting composite types info from libpq - Mailing list pgsql-hackers

From Daniele Varrazzo
Subject getting composite types info from libpq
Date
Msg-id AANLkTimX0AV2TXodxqOZtaSRjbe7AW8JUda7FYt7CGWO@mail.gmail.com
Whole thread Raw
Responses Re: getting composite types info from libpq  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-hackers
Hello,

when a query returns a composite type, the libpq PQftype() function
reports the oid of the "record" type. In psycopg:
   >>> cur.execute("select (1,2)")   >>> cur.description   (('row', 2249, None, -1, None, None, None),)
   test=# select typname from pg_type where oid = 2249;    typname   ---------    record

Is there a way to recursively retrieve the types for the record components?

Thanks,

-- Daniele


pgsql-hackers by date:

Previous
From: Dmitriy Igrishin
Date:
Subject: Re: hstores in pl/python
Next
From: Tom Lane
Date:
Subject: Re: Segfault related to pg_authid when running initdb from git master