Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Enke, Dr., Michael" <michael.enke@xxxxxxxxxxxxxxxxxx> 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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux