From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | Neil Conway <neilc(at)samurai(dot)com> |
Cc: | Ashley Cambrell <ash(at)freaky-namuh(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: default to WITHOUT OIDS? |
Date: | 2003-01-11 02:27:43 |
Message-ID: | 20030111102714.N45491-100000@houston.familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
So what actually is the point of OIDs then? If you set OIDs ff by default
and use currval, what's the point of having OIDs at all?
Chris
On 10 Jan 2003, Neil Conway wrote:
> On Fri, 2003-01-10 at 18:17, Ashley Cambrell wrote:
> > The problem with getting rid of OIDs as default is there is then no way
> > to get the primary key of a just inserted row with out OIDs (as far as I
> > know)
>
> Use currval() on the PK sequence -- if you call it from within the query
> that inserted a row, it is guaranteed to give you the last sequence
> value that it generated.
>
> However, I agree that one of the drawbacks of this scheme would be
> breaking the OID in the status string returned by INSERT and similar
> commands. Not too big a deal, IMHO (users can still get the same effect
> by specifying WITH OIDS, or toggling the GUC var)...
>
> Cheers,
>
> Neil
> --
> Neil Conway <neilc(at)samurai(dot)com> || PGP Key ID: DB3C29FC
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2003-01-11 02:33:56 | Re: v7.3.1 psql against a v7.2.x database ... |
Previous Message | Christopher Kings-Lynne | 2003-01-11 02:22:20 | Re: default to WITHOUT OIDS? |