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

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: Thom Brown <thom(at)linux(dot)com>, Jan-Peter Seifert <Jan-Peter(dot)Seifert(at)gmx(dot)de>, "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 13:06:09
Message-ID: CA+OCxoxd6M4Fbb8aeZKn8Xmz0q-TH0jFAWwwLhLKhsOKfNCDrg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Saturday, July 14, 2012, Guillaume Lelarge wrote:

> On Thu, 2012-07-12 at 12:31 +0100, Thom Brown wrote:
> > On 12 July 2012 12:20, Jan-Peter Seifert <Jan-Peter(dot)Seifert(at)gmx(dot)de<javascript:;>>
> wrote:
> > > Hello,
> > >
> > > I have a feature request for the 'Edit data' window that is available
> for each table in pgAdmin.
> > >
> > > As the OID column is not guaranteed to contain unique OIDs
>
> Oops, sorry? each OID is unique.
>
>
No, the counter can wrap.

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

>
> > > Another drawback of OID columns is that you can't add them afterwards.
> >
>
> 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).
>
> > Use of the CTID system column would work.
>
> I don't see how that could work. CTIDs obviously are unique, but anyone,
> updating a line will get another CTID for this line. If you try to
> update it afterwards, in the best case, it errors out because there is
> no line at this CTID. In the worst case, you update a completely
> different line.
>
>
> --
> Guillaume
> http://blog.guillaume.lelarge.info
> http://www.dalibo.com
>
>
> --
> Sent via pgadmin-support mailing list (pgadmin-support(at)postgresql(dot)org<javascript:;>
> )
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-support
>

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Guillaume Lelarge 2012-07-14 13:09:07 Re: Feature request - Edit data and tables without a primary key
Previous Message Guillaume Lelarge 2012-07-14 13:02:13 Re: pgScript error when relation name contains ")" symbol