Re: determine what column(s) form the primary key, in C extention

2020-08-30 Thread James Sewell
> > (2) > > I'll use this C code as an example to build an extention in Rust. The > Postgresql bindings for Rust I have don't contain a definition of > `FirstLowInvalidHeapAttributeNumber` for some reason. I can define it > since it's simply single digit constant. > Not an answer to your question

Re: determine what column(s) form the primary key, in C extention

2020-07-28 Thread David Rowley
On Wed, 29 Jul 2020 at 03:45, alex maslakov wrote: > int i = -1; > while ((i = bms_next_member(pkattnos , i)) >= 0) { > /* do stuff with i */ > /* you'll need to use i - FirstLowInvalidHeapAttributeNumber to > get the pg_attribute.attnum */ > > > elog(INFO, "bm

Re: determine what column(s) form the primary key, in C extention

2020-07-28 Thread alex maslakov
I'm emailing it to the 'general' list. (1) This:     int i = -1;     while ((i = bms_next_member(pkattnos , i)) >= 0) {     /* do stuff with i */     /* you'll need to use i - FirstLowInvalidHeapAttributeNumber to get the pg_attribute.attnum */     elog(INFO, "bms_next_member