Re: "RETURNING PRIMARY KEY" syntax extension
От | Jim Nasby |
---|---|
Тема | Re: "RETURNING PRIMARY KEY" syntax extension |
Дата | |
Msg-id | 539617D7.1020300@nasby.net обсуждение исходный текст |
Ответ на | Re: "RETURNING PRIMARY KEY" syntax extension (Hannu Krosing <hannu@2ndQuadrant.com>) |
Ответы |
Re: "RETURNING PRIMARY KEY" syntax extension
|
Список | pgsql-hackers |
On 6/9/14, 8:35 AM, Hannu Krosing wrote: > On 06/09/2014 06:58 AM, Ian Barwick wrote: >> Hi, >> >> The JDBC API provides the getGeneratedKeys() method as a way of >> retrieving >> primary key values without the need to explicitly specify the primary key >> column(s). > Is it defined by the standard, to return _only_ generated primary keys, > and not > for example generated alternate keys ? I was wondering that myself. I think it's certainly reasonable to expect someone would wan RETURNING SEQUENCE VALUES, whichwould return the value of every column that owned a sequence (ie: ALTER SEQUENCE ... OWNED BY). ISTM that would certainlyhandle the performance aspect of this, and it sounds more in line with what I'd expect getGeneratedKeys() to do. -- Jim C. Nasby, Data Architect jim@nasby.net 512.569.9461 (cell) http://jim.nasby.net
В списке pgsql-hackers по дате отправления: