From: | "Aaron J(dot) Seigo" <aaron(at)gtv(dot)ca> |
---|---|
To: | "Ansley, Michael" <Michael(dot)Ansley(at)intec(dot)co(dot)za>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Ed Loehr <ELOEHR(at)austin(dot)rr(dot)com>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | RE: [HACKERS] getting new serial value of serial insert |
Date: | 1999-11-04 21:29:15 |
Message-ID: | 99110414345002.10841@stilborne |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-11-04 21:55:56 | Re: [HACKERS] psql Week 4.142857 |
Previous Message | Stuart Woolford | 1999-11-04 21:12:06 | Re: [GENERAL] indexed regex select optimisation missing? |