--- Jonas Bengtsson <jonas.b@home.se> wrote:
> Can't you do a dump with the oid's?
Yes, but I would never suggest it.
> But when I want to know the primary key of the inserted row
> I have to do an extra select query. If I use oid I just use
> pg_getlastoid() in php.
> And it is redundant data to store another integer.
You should not use oid's as primary keys just because you want
to save a little HD space.
I contributed a some code on PHPBuilder for a function that
returns the insert id of a SERIAL primary key. You can view it
here:
http://www.phpbuilder.com/snippet/download.php?type=snippet&id=304
. It works well for me and it does not kludge my code like
using the oid does.
Brent
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/