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

Поиск
Список
Период
Сортировка
От Aaron J. Seigo
Тема RE: [HACKERS] getting new serial value of serial insert
Дата
Msg-id 99110414345002.10841@stilborne
обсуждение исходный текст
Ответ на RE: [HACKERS] getting new serial value of serial insert  ("Ansley, Michael" <Michael.Ansley@intec.co.za>)
Список pgsql-hackers
hi..

> Why can't this simply be done with a stored proc?  Or am I missing the boat?
> Stored proc accepts parameters to insert, and returns whatever value you
> want it to.
> 

in an earlier post i mentioned that this doesn't do anything FUNCTIONALY new,
it merely allows doing it with EASE and greater SPEED.. 

ease, because you don't have to write a function (not really stored procedure
=) to handle each specific insert and return pair you want.. with RETURN this
would be defined on a per query basis... 

speed, because you would skip the SELECT to get the information.. it would tap
the tuple whilst still in memory during the read, like a tigger... you skip the
SELECt...

last, it allows certain security possibilities: giving people access to the
information they just inserted without giving them general SELECT permissions
on the table(s) involved...

so, no.. you aren't missing the boat by thinking this sort of thing CAN be done
via other methods. the point is merely that the current methods are clumsy and
slow and it seems a number of people are going through the current necessary
hoops... 

-- 
Aaron J. Seigo
Sys Admin


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

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: packaging of 6.5.3
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: packaging of 6.5.3