"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