The following bug has been logged on the website:
Bug reference: 16730
Logged by: Sofoklis Papasofokli
Email address: sofoklis24@gmail.com
PostgreSQL version: 10.15
Operating system: PostgreSQL 10.15 (Ubuntu 10.15-1.pgdg20.04+1) on
Description:
The following simplified example used to work on previous versions, but not
on 10.15, we tested it again on version 10.11 and it works.
We read in the release notes of 10.15 that there is a change when using like
with inheritance, maybe it is related.
CREATE TABLE id_base
(
id SERIAL PRIMARY KEY
);
CREATE TABLE inherited_table
(
LIKE id_base INCLUDING DEFAULTS INCLUDING CONSTRAINTS INCLUDING
INDEXES,
"self_ref_if" INT,
CONSTRAINT self_ref_id_fk FOREIGN KEY ("self_ref_if")
REFERENCES inherited_table (id) MATCH SIMPLE
ON UPDATE RESTRICT ON DELETE RESTRICT
)
INHERITS (id_base);