Re: "RETURNING PRIMARY KEY" syntax extension - Mailing list pgsql-hackers

From Ian Barwick
Subject Re: "RETURNING PRIMARY KEY" syntax extension
Date
Msg-id 53B3A3D4.2010105@2ndquadrant.com
Whole thread Raw
In response to Re: "RETURNING PRIMARY KEY" syntax extension  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: "RETURNING PRIMARY KEY" syntax extension  (Ian Barwick <ian@2ndquadrant.com>)
List pgsql-hackers
On 14/07/01 23:13, Robert Haas wrote:
> On Tue, Jul 1, 2014 at 8:00 AM, Rushabh Lathia <rushabh.lathia@gmail.com> wrote:
>> .) In map_primary_key_to_list() patch using INDEX_ATTR_BITMAP_IDENTITY_KEY
>> bitmap to get the keycols. In IndexAttrBitmapKind there is also
>> INDEX_ATTR_BITMAP_KEY, so was confuse between INDEX_ATTR_BITMAP_KEY and
>> INDEX_ATTR_BITMAP_IDENTITY_KEY and also haven't found related comments in
>> the code. Later with use of testcase and debugging found confirmed that
>> INDEX_ATTR_BITMAP_IDENTITY_KEY only returns the Primary key.
> 
> Actually, that depends on how REPLICA IDENTITY is set.  IOW, you can't
> assume that will give you the primary key.

Damn, fooled by the name. Thanks for the info; I'll rework the patch
accordingly.

Regards


Ian Barwick


-- Ian Barwick                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Abhijit Menon-Sen
Date:
Subject: Re: 9.5 CF1
Next
From: Ants Aasma
Date:
Subject: Re: better atomics - v0.5