Re: PL/Python result metadata
| От | Jan Urbański |
|---|---|
| Тема | Re: PL/Python result metadata |
| Дата | |
| Msg-id | 4F0E0C1C.9040504@wulczer.org обсуждение |
| Ответ на | Re: PL/Python result metadata (Dimitri Fontaine <dimitri@2ndQuadrant.fr>) |
| Список | pgsql-hackers |
On 11/01/12 22:52, Dimitri Fontaine wrote: > Peter Eisentraut <peter_e@gmx.net> writes: >> .colnames() returns a list of column names (strings) >> .coltypes() returns a list of type OIDs (integers) >> >> I just made that up because there is no guidance in the other standard >> PLs for this sort of thing, AFAICT. > > What about having the same or comparable API as in psycopg or DB API > > http://initd.org/psycopg/docs/cursor.html > > You could expose a py.description structure? +1 for providing a read-only result.description. Not sure if it's worth it to follow DB-API there, but maybe yes. Perhaps we could have a result.description_ex information that's PG-specific or just not present in PEP 249, like the typmod, collation and so on. J
В списке pgsql-hackers по дате отправления: