| From: | Elvis Pranskevichus <elprans(at)gmail(dot)com> | 
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org | 
| Subject: | COMMENT ON CONSTRAINT <name> ON DOMAIN <domain>? | 
| Date: | 2013-11-21 20:29:46 | 
| Message-ID: | 5310157.yWWCtg2qIU@klinga.prans.org | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Hello,
I may be totally missing something, but there seems to be no way 
to create a COMMENT on a domain constraint.  There is
COMMENT ON CONSTRAINT constraint_name ON table_name
but no such thing for domain constraints, which seems like a 
weird omission.  
I couldn't find any relevant discussions on the list; is there a 
technical reason this is not implemented?
Looking at the source, get_object_address() always assumes a 
constraint is a table constraint.  It seems to me that there is 
a relatively easy fix:
COMMENT ON CONSTRAINT constraint_name ON DOMAIN domain_name,
then store constraint subject type (relation vs. domain) in 
objname list, and handle that in get_object_address().
Thoughts?
Elvis
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2013-11-21 20:31:42 | Re: Patch for fail-back without fresh backup | 
| Previous Message | Szymon Guz | 2013-11-21 20:15:53 | Re: new unicode table border styles for psql |