Re: inserting new records without OIDs

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Andreas Pflug" <pgadmin(at)pse-consulting(dot)de>, "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
Cc: <mdoggett(at)coas(dot)oregonstate(dot)edu>, "[pgADMIN]" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: inserting new records without OIDs
Date: 2004-02-18 11:11:01
Message-ID: 03AF4E498C591348A42FC93DEA9661B889F3C6@mail.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

> -----Original Message-----
> From: Andreas Pflug [mailto:pgadmin(at)pse-consulting(dot)de]
> Sent: 18 February 2004 10:13
> To: Christopher Kings-Lynne
> Cc: mdoggett(at)coas(dot)oregonstate(dot)edu; [pgADMIN]
> Subject: Re: [pgadmin-support] inserting new records without OIDs
>
> Christopher Kings-Lynne wrote:
>
> >> Not true. Currently, you need either OID *or* a primary key.
> >> Obviously, that id column should get a pk.
> >> We'll extend the grid some time, to accept any other unique keys
> >> also. Still, defining a PK on every table is best practice.
> >> Defining a column as serial does *not* guarantee it's unique!
> >
> >
> > Remember that unique indexes can have multiple NULL values.
>
> Shhh, didn't think of that. So we won't ever accept unique
> indices for this.

Unique + not null should be OK, but only if the data was inserted with
that constraint in place.

> > Also, oids are not guaranteed unique.
>
> AFAICS this only happens on wrap around, i.e. hopefully
> never. Being strict, we shouldn't rely on oid uniqueness, but
> in practice hopefully nobody will ever notice.

<grin>

Regards, Dave.

Browse pgadmin-support by date

  From Date Subject
Next Message Robson Richieri 2004-02-18 14:46:01 Error Message: ERROR: Bad numeric input format '-591,87'
Previous Message Andreas Pflug 2004-02-18 10:12:57 Re: inserting new records without OIDs