Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property?
Дата
Msg-id 19025.1421282969@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property?  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 01/14/2015 07:29 PM, Tom Lane wrote:
>> If you don't find that problematic, how about this case?
>> 
>> regression=# create table src2 (f1 int, primary key(oid)) with oids;
>> CREATE TABLE
>> regression=# create table dst2 (like src2 including indexes);
>> ERROR:  column "oid" named in key does not exist

> I agree it's odd, and probably wrong, although it's been like that for a 
> very long time, hasn't it?

Sure, LIKE has always behaved this way.  It still seems wrong though.
As a reference point, creating a table that inherits from src1 or src2
will result in it having oids (even if you say WITHOUT OIDS).
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property?
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: hung backends stuck in spinlock heavy endless loop