Re: I can't get row type from tuple (SPI)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: I can't get row type from tuple (SPI)
Дата
Msg-id 24458.1131328741@sss.pgh.pa.us
обсуждение исходный текст
Ответ на I can't get row type from tuple (SPI)  ("Pavel Stehule" <pavel.stehule@hotmail.com>)
Ответы Re: I can't get row type from tuple (SPI)
Список pgsql-hackers
"Pavel Stehule" <pavel.stehule@hotmail.com> writes:
> rettupdesc = lookup_rowtype_tupdesc(rettype,0);

This is wrong --- if you don't know what typmod to use, *always* pass -1
not 0.  (I suspect that rettype is RECORD and that -1 would have
resulted in a NULL result.)

It seems like SPI is missing a needed function: it should have an
SPI_gettypmod to go along with SPI_gettypeid.  This would probably
give you the correct typmod to pass to lookup_rowtype_tupdesc here.
        regards, tom lane


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