Re: in C trigger function find out if column is part of primary key

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: in C trigger function find out if column is part of primary key
Дата
Msg-id 1364937443.76835.YahooMailNeo@web162901.mail.bf1.yahoo.com
обсуждение исходный текст
Ответ на in C trigger function find out if column is part of primary key  ("Enke, Dr., Michael" <michael.enke@wincor-nixdorf.com>)
Список pgsql-general
"Enke, Dr., Michael" <michael.enke@wincor-nixdorf.com> wrote:
> I have to find out if a column ( i = 0, …, tupdesc->natts-1 ) is
> part of a primary key but for performance reasons I do not want
> to execute another query via SPI.  Is this possible?

You might get some inspiration from looking at this bit of code:


http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=contrib/tcn/tcn.c;h=eb7e1a61a6a1d5c5ed2e840af41410ac4a52418f;hb=master#l127

--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Joe Van Dyk
Дата:
Сообщение: Re: Using varchar primary keys.
Следующее
От: Stephen Scheck
Дата:
Сообщение: Dynamic/polymorphic record/composite return types for C user-defined-functions