Re: "RETURNING PRIMARY KEY" syntax extension
От | Greg Stark |
---|---|
Тема | Re: "RETURNING PRIMARY KEY" syntax extension |
Дата | |
Msg-id | CAM-w4HO5tVe+ESd0JxoiEj3x4tMGJQwf_gRjWWDEy-_QwNmAkA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: "RETURNING PRIMARY KEY" syntax extension (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: "RETURNING PRIMARY KEY" syntax extension
|
Список | pgsql-hackers |
On Thu, Jul 3, 2014 at 7:37 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > TBH, I thought that RETURNING PRIMARY KEY was already fairly iffy > in that the application would have little idea what it was getting back. > IF EXISTS would make it so spongy as to be useless, IMO. Seems easy enough to look at the count of columns in the result set. But it seems like noise words -- if you don't put IF EXISTS then surely you'll get the same behaviour anyways, no? Fwiw when I wrote ORM-like layers I used to describe the output of the query, including sometimes issuing WHERE 1<>0 queries and looking at the output column types when I needed that before executing the query. Using table metadata would have required a much more in depth understanding of how the database worked and also wouldn't handle expressions, joins, set operations, etc. -- greg
В списке pgsql-hackers по дате отправления: