pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <maillist@candle.pha.pa.us>
Cc: Michael Olivier <molivier@yahoo.com>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] keeping OID's when copying table
Date: Sun, 09 May 1999 13:11:21 -0400
Message-ID: <2364.926269881@sss.pgh.pa.us> (raw)
In-Reply-To: <199905091202.IAA16745@candle.pha.pa.us>

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



view thread (6+ messages)

Message-ID: <2364.926269881@sss.pgh.pa.us>
Permalink:  ../2364.926269881@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2364.926269881@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, maillist@candle.pha.pa.us, molivier@yahoo.com
  Subject: Re: [SQL] keeping OID's when copying table
  In-Reply-To: <2364.926269881@sss.pgh.pa.us>
  References: <199905091202.IAA16745@candle.pha.pa.us> <2364.926269881@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox