Re: Feature request - Edit data and tables without a primary key - Mailing list pgadmin-support

From Guillaume Lelarge
Subject Re: Feature request - Edit data and tables without a primary key
Date
Msg-id 1342274474.8088.29.camel@localhost.localdomain
Whole thread Raw
In response to Re: Feature request - Edit data and tables without a primary key  (Jan-Peter Seifert <Jan-Peter.Seifert@gmx.de>)
List pgadmin-support
On Sat, 2012-07-14 at 15:43 +0200, Jan-Peter Seifert wrote:
> Hello,
> 
> thank you very much for your feedback everyone!
> 
> Am 14.07.2012 15:06, schrieb Dave Page:
> 
> >     >  it would be nice to have additional/other fallback options ( via
> >     check box in pgAdmin's general options? ) to identify rows for
> >     editing in tables without primary keys.
> >     > > I'd suggest serials ( serial/serial4 and bigserial/serial8 )
> > 
> >     You can't be sure a serial (serial2, serial4, and serial8) column will
> >     only contain unique values.
> > 
> >     >  or unique columns/constraints.
> > 
> >     Yes, this would be interesting to add. I thought we already did it, but
> >     I gues I was wrong. I'll add a ticket to work on this later.
> > 
> > 
> > That method will work only if the columns involved are all not null
> > constrained.
> 
> Sorry - must have been in a hurry ...
> 
> Then serials with a unique constraint or unique constraints with 'all
> necessary' 'NOT NULL'-constraints maybe?
> 

Well, if you only want to have unique columns with NOT NULL constraint,
you pretty much have a primary key constraint.

We could allow updating/removing lines if they do have a . Or we can
BEGIN; UPDATE/DELETE; then check how many lines are updated/deleted, and
COMMIT if there is only one, and ROLLBACK if there are more. I just
don't see how to do that with a nice UI.

We can also only allow the update/remove of lines who have unique
columns not NULL.

> >     You can add OID columns to an already existing table since 8.4. But it
> >     doesn't mean you want to (and actually I don't want to add OID columns
> >     to my tables).
> 
> That's good - then at least you don't have to recreate the table in
> order to edit it with pgAdmin ...
> Otherwise we have no need for OID columns ...
> 

Adding OID field will recreate the table. This isn't something you'll do
on huge tables.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com



pgadmin-support by date:

Previous
From: Jan-Peter Seifert
Date:
Subject: Re: Feature request - Edit data and tables without a primary key
Next
From: Guillaume Lelarge
Date:
Subject: Re: Feature request - Edit data and tables without a primary key