Re: Feature request - Edit data and tables without a primary key

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Jan-Peter Seifert <Jan-Peter(dot)Seifert(at)gmx(dot)de>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, Thom Brown <thom(at)linux(dot)com>, "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Feature request - Edit data and tables without a primary key
Date: 2012-07-14 14:01:14
Message-ID: 1342274474.8088.29.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Guillaume Lelarge 2012-07-14 14:01:51 Re: Feature request - Edit data and tables without a primary key
Previous Message Jan-Peter Seifert 2012-07-14 13:54:17 Re: Feature request - Edit data and tables without a primary key