You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't directly related to this project; perhaps you know the answer:
I'm writting an extention in C. It's a function for a trigger. I need to dynamically identify which column, or columns, if the primary key is composed of multiple columns, is the primary key -- their indexes or names.
I suppose, the function get_primary_key_attnos can help me.
It returns *Bitstamp. And it's got "nwords" and "words[]". But those return just big numbers, not something that look similar to an index of the primary key column.
Therefore, I haven't been able to figure out how to proceed with it and identify the primary key. Any idea?
The text was updated successfully, but these errors were encountered:
You should ask this on the pgsql-general mailing list or on the #postgresql irc channel on freenode.
But a Bitmapset is a set of small integers represented as a bitmap, and there are functions to iterate over it and return the contained integer values; these are the attnos of the primary key columns.
This isn't directly related to this project; perhaps you know the answer:
I'm writting an extention in C. It's a function for a trigger. I need to dynamically identify which column, or columns, if the primary key is composed of multiple columns, is the primary key -- their indexes or names.
I suppose, the function get_primary_key_attnos can help me.
postgresql_projects/src/include/catalog/pg_constraint.h
Line 236 in 5afaa2e
It returns *Bitstamp. And it's got "nwords" and "words[]". But those return just big numbers, not something that look similar to an index of the primary key column.
Therefore, I haven't been able to figure out how to proceed with it and identify the primary key. Any idea?
The text was updated successfully, but these errors were encountered: