I know we shouldn't use them; but ...

We have some apps that are using OIDS only as a unique key for updating
single records in table.

To transfer these tables to another system using pg_dump; I really only
need "WITH OIDS" on the CREATE TABLE command, not the COPY statements.

While playing with this I noticed that using the -c -o options of
pg_dump together; I get OIDS in COPY statements, but not in the CREATE
commands. Either this is a bug; or I'm missing something here...

Search Discussions

  • Tom Lane at Aug 2, 2008 at 4:43 am

    Frank Bax writes:
    While playing with this I noticed that using the -c -o options of
    pg_dump together; I get OIDS in COPY statements, but not in the CREATE
    commands. Either this is a bug; or I'm missing something here...
    Please provide some details ... AFAICS the COPY and CREATE TABLE cases
    are testing the same conditions.

    regards, tom lane
  • Frank Bax at Aug 2, 2008 at 11:39 am

    Tom Lane wrote:
    Frank Bax <[email protected]> writes:
    While playing with this I noticed that using the -c -o options of
    pg_dump together; I get OIDS in COPY statements, but not in the CREATE
    commands. Either this is a bug; or I'm missing something here...
    Please provide some details ... AFAICS the COPY and CREATE TABLE cases
    are testing the same conditions.


    Never mind; I was missing something. It seems that pg_dump puts out SET
    commands instead of using "WITH OIDS" option on "CREATE TABLE"; as in:

    SET default_with_oids = true;
    SET default_with_oids = false;

    Sorry for the noise.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedAug 1, '08 at 10:34p
activeAug 2, '08 at 11:39a
posts3
users2
websitepostgresql.org
irc#postgresql

2 users in discussion

Frank Bax: 2 posts Tom Lane: 1 post

People

Translate

site design / logo © 2023 Grokbase