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

From Andres Freund
Subject Re: "RETURNING PRIMARY KEY" syntax extension
Date
Msg-id 20140609171323.GF8406@alap3.anarazel.de
Whole thread Raw
In response to Re: "RETURNING PRIMARY KEY" syntax extension  (Vik Fearing <vik.fearing@dalibo.com>)
Responses Re: "RETURNING PRIMARY KEY" syntax extension  (Vik Fearing <vik.fearing@dalibo.com>)
List pgsql-hackers
On 2014-06-09 13:42:22 +0200, Vik Fearing wrote:
> On 06/09/2014 09:06 AM, Gavin Flower wrote:
> > From memory all unique keys can be considered 'candidate primary keys',
> > but only one can be designated 'the PRIMARY KEY'.
> 
> Almost.  Candidate keys are also NOT NULL.

The list actually is a bit longer. They also cannot be partial.

There's generally also the restriction that for some contexts - like
e.g. foreign keys - primary/candidate keys may not be deferrable..

Greetings,

Andres Freund

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



pgsql-hackers by date:

Previous
From: Gavin Flower
Date:
Subject: Re: "RETURNING PRIMARY KEY" syntax extension
Next
From: Heikki Linnakangas
Date:
Subject: Re: Supporting Windows SChannel as OpenSSL replacement