Information about the type of elements in an array from libpq

Поиск
Список
Период
Сортировка
От Markus Bertheau
Тема Information about the type of elements in an array from libpq
Дата
Msg-id 1091452917.2728.26.camel@dicaprio.akademie1.de
обсуждение исходный текст
Список pgsql-general
В Пнд, 02.08.2004, в 14:49, Federico Di Gregorio пишет:
> On lun, 2004-08-02 at 14:30 +0200, Markus Bertheau wrote:
> > Hi,
> >
> > I wonder if there is some kind of support for PostgreSQL's arrays in
> > psycopg? The fetch routines return the literal array syntax of
> > PostgreSQL. I'd want the fetch routines to return a list for
> > PostgreSQL's arrays, with the common types (text, int, timestamp)
> > handled like they are everywhere else in psycopg.
>
> if someone provides me with a foolprof way to extract type information
> from arrays i'll implement it. :/

It seems to me that for TEXT[] PQftype() returns 1009, and 1009 is hard
coded to be array of text, as I understand it (see also pg_type.typelem,
which is 25, the oid for text). Similarly for the other types. Wouldn't
that information be enough?

Thanks

--
Markus Bertheau <twanger@bluetwanger.de>


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

Предыдущее
От: Secrétariat
Дата:
Сообщение: Stored procedures
Следующее
От: Bill Moran
Дата:
Сообщение: Re: Stored procedures