On 2025/06/26 0:45, Álvaro Herrera wrote:
On 2025-Jun-26, Fujii Masao wrote:
CREATE TABLE ctlt1_inh (LIKE ctlt1 INCLUDING CONSTRAINTS INCLUDING COMMENTS)
INHERITS (ctlt1);
\d+ ctlt1_inh
-SELECT description FROM pg_description, pg_constraint c WHERE classoid =
'pg_constraint'::regclass AND objoid = c.oid AND c.conrelid =
'ctlt1_inh'::regclass;
+SELECT conname, description FROM pg_description, pg_constraint c WHERE classoid =
'pg_constraint'::regclass AND objoid = c.oid AND c.conrelid = 'ctlt1_inh'::regclass ORDER
BY conname COLLATE "C";
However, since ctlt1_inh is created with INCLUDING COMMENTS, this test
doesn't seem to demonstrate the case you mentioned — that comments on
not-null constraints are copied even without INCLUDING CONSTRAINTS.
Am I misunderstanding?
Hmm, yeah the case I wanted to modify was for ctlt12_comments which does
INCLUDING COMMENTS without constraints, apologies. In that case it's
better to modify ctlt2 instead, as shown here.
Thanks for updating the tests!
I've incorporated the changes into the patch and committed it.
Regards,
--
Fujii Masao
NTT DATA Japan Corporation