Re: cataloguing NOT NULL constraints
От | Alexander Lakhin |
---|---|
Тема | Re: cataloguing NOT NULL constraints |
Дата | |
Msg-id | 83bfef0d-3e3c-e4c7-f6c4-29db5e632883@gmail.com обсуждение исходный текст |
Ответ на | Re: cataloguing NOT NULL constraints (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
Ответы |
Re: cataloguing NOT NULL constraints
|
Список | pgsql-hackers |
Hello Alvaro, 01.05.2024 20:49, Alvaro Herrera wrote: > Here are two patches that I intend to push soon (hopefully tomorrow). > Thank you for fixing those issues! Could you also clarify, please, how CREATE TABLE ... LIKE is expected to work with NOT NULL constraints? I wonder whether EXCLUDING CONSTRAINTS (ALL) should cover not-null constraints too. What I'm seeing now, is that: CREATE TABLE t1 (i int, CONSTRAINT nn NOT NULL i); CREATE TABLE t2 (LIKE t1 EXCLUDING ALL); \d+ t2 -- ends with: Not-null constraints: "nn" NOT NULL "i" Or a similar case with PRIMARY KEY: CREATE TABLE t1 (i int PRIMARY KEY); CREATE TABLE t2 (LIKE t1 EXCLUDING CONSTRAINTS EXCLUDING INDEXES); \d+ t2 -- leaves: Not-null constraints: "t2_i_not_null" NOT NULL "i" Best regards, Alexander
В списке pgsql-hackers по дате отправления: