Re: PL/Python result metadata

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: PL/Python result metadata
Дата
Msg-id 1326739591.29466.4.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на Re: PL/Python result metadata  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Ответы Re: PL/Python result metadata  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Список pgsql-hackers
On ons, 2012-01-11 at 22:52 +0100, 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?

I deliberately chose not to do that, because the PL/Python API is
intentionally totally different from the standard DB-API, and mixing in
some semi-conforming look-alike would be quite confusing from both ends.
I think we should stick with the PL/Python API being a small layer on
top of SPI, and let the likes of plpydbapi handle the rest.




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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: PL/Python result metadata
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: pgstat documentation tables