Re: Example of RETURNING clause to get auto-generated keys - Mailing list pgsql-general

From Ken Johanson
Subject Re: Example of RETURNING clause to get auto-generated keys
Date
Msg-id 45B815D8.9010702@kensystem.com
Whole thread Raw
In response to Re: Example of RETURNING clause to get auto-generated keys  (Ken Johanson <pg-user@kensystem.com>)
Responses Re: Example of RETURNING clause to get auto-generated keys  ("John D. Burger" <john@mitre.org>)
Re: Example of RETURNING clause to get auto-generated keys  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-general
>
> Now playing devil's advocate, can anyone see scenarios where this will
> not work as expected? Examples (descriptions not sql necessarily) of
> those would be helpful too...
>

Just to be sure, will the RETURNING clause work with custom sequences
(say, non numeric or increment by two) or other types of key
generators?... And how will triggers interfere with it (if at all)?

I honestly have limited experience with server generated keys that are
not numeric/serial (or uuids), or with cases where triggers,
constraints, etc might come into play (I'm used to using the DB mostly
as a storage device and using server-side logic..)

Ken




pgsql-general by date:

Previous
From: Ken Johanson
Date:
Subject: Re: Example of RETURNING clause to get auto-generated keys
Next
From: "Merlin Moncure"
Date:
Subject: Re: Problem with replace