Re: Dumpall without OID

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Girts Laudaks <laudaksg(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Dumpall without OID
Date: 2011-01-28 15:50:41
Message-ID: 201101280750.42003.adrian.klaver@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Friday 28 January 2011 4:54:18 am Girts Laudaks wrote:
> Well, seems that everything is OK. There are no OIDs used from the
> application side but they still appear in the database tables, this was
> what made the confusion.
>
> Thanks,
> G.
>

OIDS on user tables have not been on by default since 8.0. Possible reasons why
they exist:
If the tables have been around since 8.0- OIDS will carry on with them.
The table CREATE statements have the WITH OIDS clause.
In postgresql.conf the default_with_oids setting is set on.

In addition to the point I made yesterday, some old database drivers rely on
OIDS to determine uniqueness. If you are positive that they are not needed you
can use the ALTER TABLE table_name SET WITHOUT OIDS to remove the OID column
from a table
(http://www.postgresql.org/docs/9.0/interactive/sql-altertable.html)

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2011-01-28 16:34:17 Re: Problem with restoring from backup on 9.0.2
Previous Message Dmitriy Igrishin 2011-01-28 15:11:33 Re: Store base64 in database. Use bytea or text?