Re: tg_relation doesn't seem to have the attribute names!

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: tg_relation doesn't seem to have the attribute names!
Дата
Msg-id 14727.1094487911@sss.pgh.pa.us
обсуждение исходный текст
Ответ на tg_relation doesn't seem to have the attribute names!  (Graeme Hinchliffe <graeme.hinchliffe@zeninternet.co.uk>)
Список pgsql-general
Graeme Hinchliffe <graeme.hinchliffe@zeninternet.co.uk> writes:
>     I am using the following line to retrieve the attribute name of the 1st
> column for a table on which a trigger has been fired.

> idfield=SPI_fname(trigdata->tg_relation->rd_att,0);

SPI_fname thinks that column numbers start with 1, not 0.

> This code did work for 7.3.x but isn't for 7.4.3

I rather doubt it, as a quick look at the sources shows that SPI_fname
has always returned null for bogus column number (including 0).

            regards, tom lane

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

Предыдущее
От: Ian Barwick
Дата:
Сообщение: Re: Confused with db client encoding
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: RAD with postgreSQL