From: | Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | getting composite types info from libpq |
Date: | 2010-12-15 18:25:01 |
Message-ID: | AANLkTimX0AV2TXodxqOZtaSRjbe7AW8JUda7FYt7CGWO@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general 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
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2010-12-15 18:43:19 | Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore |
Previous Message | Jan Kesten | 2010-12-15 18:12:46 | Re: Searing array fields - or should I redesign? |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-12-15 18:51:00 | Re: Segfault related to pg_authid when running initdb from git master |
Previous Message | Dmitriy Igrishin | 2010-12-15 18:22:56 | Re: hstores in pl/python |