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

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property?
Дата
Msg-id CAKFQuwZHs_Xo+uLaQC9zt-HOf0RzorqeZ3ExkKBVMM9QE_8eEg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Saturday, April 25, 2015, Tom Lane <tgl@sss.pgh.pa.us> wrote:

It's perhaps debatable whether it should act that way, but in the absence
of complaints from the field, I'm hesitant to change these cases.  It
might be better if the effective behavior were "table gets OIDs if
default_with_oids = true or WITH OIDS is given or base table has OIDs".

+1
 

Still another case that needs to be thought about is "create table likeit
(like base) without oids" where base does have OIDs.  Probably the right
thing here is to let the WITHOUT OIDS spec override what we see in base.


Why are oids special in this manner?  No other inherited column can be omitted from the child table.  Though I guess unlike inherits there is no reason to mandate the final result be identical to the base table - though here is something to be said for pointing out the inconsistency and requiring the user to alter table if indeed they want to have the oid-ness changed.

David J.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Shouldn't CREATE TABLE LIKE copy the relhasoids property?