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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [SQL] keeping OID's when copying table
Дата
Msg-id 2364.926269881@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [SQL] keeping OID's when copying table  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Re: INSERT/UPDATE waiting (another example)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [SQL] How match percent sign in SELECT using LIKE?