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

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

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

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

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

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Guillaume Lelarge 2012-07-14 12:59:21 Re: Launching Application on Desktop in RHEL 6.1 pgsql 8.4
Previous Message Guillaume Lelarge 2012-07-14 12:47:46 Re: demande de support