Re: [SQL] keeping OID's when copying table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: Michael Olivier <molivier(at)yahoo(dot)com>, pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] keeping OID's when copying table
Date: 1999-05-09 17:11:21
Message-ID: 2364.926269881@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)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

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 1999-05-10 00:47:25 Re: [SQL] How match percent sign in SELECT using LIKE?
Previous Message Tom Lane 1999-05-09 16:58:13 Re: [HACKERS] Re: INSERT/UPDATE waiting (another example)