Re: inserting new records without OIDs - Mailing list pgadmin-support

From Christopher Kings-Lynne
Subject Re: inserting new records without OIDs
Date
Msg-id 40340CB6.5050100@familyhealth.com.au
Whole thread Raw
In response to Re: inserting new records without OIDs  (Andreas Pflug <pgadmin@pse-consulting.de>)
List pgadmin-support
> Shhh, didn't think of that. So we won't ever accept unique indices for 
> this.

What we do in phpPgAdmin is that rows with NULL values in the unique key 
simply aren't editable - all other rows are though.

In order, we prefer to use a PK (since it is indexed), then oid column 
(since it is complete), then unique.  It's even better if they add a 
unique constraint to their oid column :)

>> 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.

What phpPgAdmin does for oid edits is it begins a transaction, does the 
update, checks to see how many rows were affected.  If more than one row 
affected, rollback and complain, otherwise commit.

Chris



pgadmin-support by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: connection dropping continued
Next
From: "Dave Page"
Date:
Subject: Re: BUG: spaces in passwords