Re: Confusing behavior of create table like - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Confusing behavior of create table like
Date
Msg-id b5ba96dc-a305-7bb8-3580-0ac8fe53f1a1@2ndquadrant.com
Whole thread Raw
In response to Re: Confusing behavior of create table like  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Responses Re: Confusing behavior of create table like  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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.  The behavior of column defaults 
in CREATE TABLE LIKE does not currently include rewriting the default 
expression or creating additional schema objects.  If you want to 
introduce these concepts, it should be done in a general way, not just 
hard-coded for a particular case.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: 13dev failed assert: comparetup_index_btree(): ItemPointer values should never be equal
Next
From: Tom Lane
Date:
Subject: Re: 13dev failed assert: comparetup_index_btree(): ItemPointer values should never be equal