Re: [HACKERS] getting new serial value of serial insert

Поиск
Список
Период
Сортировка
От Aaron J. Seigo
Тема Re: [HACKERS] getting new serial value of serial insert
Дата
Msg-id 9911031617350B.00702@stilborne
обсуждение исходный текст
Ответ на Re: [HACKERS] getting new serial value of serial insert  (Ed Loehr <ELOEHR@austin.rr.com>)
Ответы Re: [HACKERS] getting new serial value of serial insert  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] getting new serial value of serial insert  (wieck@debis.com (Jan Wieck))
Список pgsql-hackers
hi...

> 
> No, and I'm not sure it'd be good to couple the two operations syntactically
> even if one thought of a clever way to do it.  Serial-insert value retrieval is
> a very frequent lightweight operation that fits nicely within current INSERT
> syntax, and thus it seems intuitively "natural" to stretch INSERT semantics
> in this way.

put that way, i can see your point clearly and agree... =)  

i think this would be a nice addition to pgsql...  
> In the trigger scenario you mention, I'd be slightly more inclined to say it
> crosses the fuzzy gray line into the area where a subsequent SELECT is in
> order, as opposed to modifying INSERT syntax/semantics to allow this
> SELECT functionality.  How's that for fuzzy logic?

*nods* this is where the RETURN clause we've been batting around comes in as a
more powerful and secure way of dealing with this... oh well, i was hoping that
perhaps the serial return concept could be applied here as well...

-- 
Aaron J. Seigo
Sys Admin


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "nicks.emails"
Дата:
Сообщение: your commnts
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] getting new serial value of serial insert