Re: [SQL] keeping OID's when copying table - Mailing list pgsql-sql

From Tom Lane
Subject Re: [SQL] keeping OID's when copying table
Date
Msg-id 2364.926269881@sss.pgh.pa.us
Whole thread Raw
In response to Re: [SQL] keeping OID's when copying table  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-sql
Bruce Momjian <maillist@candle.pha.pa.us> writes:
> OK, I think Tom Lane fixed this by generating an error in 6.5 beta.

>> dmdemo=> INSERT INTO new_table (oid, mycol) SELECT oid, mycol FROM
>> dmdemo-> old_table;
>> INSERT 837644 1

Hmm, what version did you do this with?  It would fairly reliably crash
the backend in recent times, so a week or two ago I put in a temporary
check to generate an error instead.  I would like to see INSERT or
UPDATE able to set the OID field; but we're too close to 6.5 release
to think about making that work for 6.5.

Right now the only way to preserve OIDs is to use COPY WITH OIDS.
        regards, tom lane


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Re: INSERT/UPDATE waiting (another example)
Next
From: Bruce Momjian
Date:
Subject: Re: [SQL] How match percent sign in SELECT using LIKE?