> Thanks Tom, I'll redo the patch using one of those, and get back to you > guys. > > So I tried using format_type_with_typemod() thinking that the "typemod info" meant things like NOT NULL, DEFAULT etc. It builds and includes the plain type but not all that stuff. E.g.
user=# alter table temp inherit entity; ERROR: child table is missing column "id" uuid when I was hoping for user=# alter table temp inherit entity; ERROR: child table is missing column "id" uuid default uuid_generate_v1mc() Is there an easy way to get the string that includes all those additional constraints/defaults etc? I noticed that defaults seem to be stored in the Form_pg_attrdef struct defined in src/include/catalog/pg_attrdef.h, and haven't yet seen how constraints like NOT NULL are handled. Thanks, Ryan