Re: disabling OIDs?

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Jeff Davis <jdavis-pgsql(at)empires(dot)org>, Lonni J Friedman <netllama(at)gmail(dot)com>, PgSQL General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: disabling OIDs?
Date: 2005-01-07 01:42:13
Message-ID: 200501062042.13547.xzilla@users.sourceforge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sunday 02 January 2005 08:24, Martijn van Oosterhout wrote:
> On Sat, Jan 01, 2005 at 06:35:30PM -0800, Jeff Davis wrote:
> > On Sun, 2004-12-12 at 20:25 -0800, Lonni J Friedman wrote:
> > > OK, thanks. So is there any real benefit in doing this in a generic
> > > (non-dspam) sense, or is it just a hack that wouldn't be noticable?
> > > Any risks or potential problems down the line?
> >
> > I'd just like to add that some 3rd party applications/interfaces make
> > use of OIDs, as a convenient id to use if there is no primary key (or if
> > the 3rd party software doesn't take the time to find the primary key).
> >
> > One might argue that those 3rd party applications/interfaces are broken,
> > but you still might want to keep OIDs around in case you have a use for
> > one of those pieces of software.
>
> Yep, especially since an OID is not a unique value and so can't
> possibly be a primary key and generally isn't indexed either. Even
> Access asks you to identify the primary key...

Of course some 3rd party apps are nice and they look for a primary key first,
then a unique index, then look for an oid. Furthermore the really clueful
ones will check # of affected rows = 1 when modifying by oid, so its pretty
safe.

--
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John DeSoi 2005-01-07 02:48:18 Re: Editor: Syntax highlighting and stored procedures surrounded by '
Previous Message Aaron Steele 2005-01-07 01:32:30 Re: warning: pg_query(): Query failed