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 171d3e96-fa39-d8b2-561d-8dd7f6157eb8@2ndquadrant.com
Whole thread Raw
In response to Confusing behavior of create table like  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Responses Re: Confusing behavior of create table like  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
List pgsql-hackers
On 2020-08-01 00:06, Konstantin Knizhnik wrote:
> Postgres provides serial and bigserial column types for which it
> implicitly creates sequence.
> As far as this mechanism is somehow hidden from user, it may be
> confusing that table
> created with CREATE TABLE LIKE has no associated sequence.

That's why identity columns were added.  You shouldn't use serial 
columns anymore, especially if you are concerned about behaviors like this.

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



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Keep elog(ERROR) and ereport(ERROR) calls in the cold path
Next
From: David Rowley
Date:
Subject: Re: Replace remaining StrNCpy() by strlcpy()