From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Bugs List <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: issue about information_schema REFERENTIAL_CONSTRAINTS |
Date: | 2010-09-02 19:12:10 |
Message-ID: | 6462.1283454730@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-docs |
Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> writes:
> (1) use the OID as the "constraint name" everywhere, it would work, it
> would not look so good for display, but it is simple and fast.
> (2) otherwise something built on top of <table,constraint>. To be on the
> safe side, I would build a string (sql_identifier?) with something like:
> quote_ident(<table name>) || '.' || quote_ident(<constraint name>)
Note that (2) fails for long names; you have to do something to
compress to NAMEDATALEN.
The big problem with either of these is that it's no longer easily
possible to extract the actual constraint name from the view.
In any case, I am fairly sure that not having the constraint_name column
show the actual constraint name is a violation of the spirit of the SQL
spec, whether or not you can claim that it meets the letter.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Ron Park | 2010-09-02 21:33:55 | BUG #5641: Can not create any python language |
Previous Message | Hannu Pohjanpalo | 2010-09-02 18:36:14 | BUG #5640: ODBC driver installed but not found |
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2010-09-02 22:09:15 | Correction: datatypes are not "faster" |
Previous Message | Fabien COELHO | 2010-09-02 18:34:46 | Re: issue about information_schema REFERENTIAL_CONSTRAINTS |