Re: Confusing behavior of create table like
| От | Tom Lane |
|---|---|
| Тема | Re: Confusing behavior of create table like |
| Дата | |
| Msg-id | 2465131.1596580052@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Confusing behavior of create table like (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>) |
| Список | pgsql-hackers |
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 2020-08-04 19:36, Konstantin Knizhnik wrote:
>> Yes, generated columns are also using implicitly generated sequences.
>> So them are very similar with SERIAL/BIGSERIAL columns. This actually
>> make we wonder why we can not handle them in the same way in
>> CREATE TABLE LIKE.
> The current specification of serial is a parse-time expansion of integer
> column, sequence, and column default.
Yeah; and note it's actually defined that way in the docs.
I'd certainly concede that serial is a legacy feature now that we have
identity columns. But, by the same token, its value is in backwards
compatibility with old behaviors. Therefore, reimplementing it in a
way that isn't 100% backwards compatible seems like entirely the
wrong thing to do. On similar grounds, I'd be pretty suspicious of
changing LIKE's behaviors around the case.
regards, tom lane
В списке pgsql-hackers по дате отправления: