Re: ADD/DROP constraints
От | Tom Lane |
---|---|
Тема | Re: ADD/DROP constraints |
Дата | |
Msg-id | 1916.1149802966@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | ADD/DROP constraints (Greg Stark <gsstark@mit.edu>) |
Ответы |
Re: ADD/DROP constraints
|
Список | pgsql-hackers |
Greg Stark <gsstark@mit.edu> writes: > Or maybe I should insist that a matching constraint name be present *and* that > the source text match? That's more of a pain to code though. Yeah, that's what I'd go with. I believe that there are bits of the system (probably in pg_dump) that look *only* at the constraint name when deciding what's inherited. (This is of course bogus, but until someone does something about coninhcount it's going to be hard to have a non-bogus solution.) Allowing a name mismatch would be bad. One other point is that you should NOT rely on consrc. See the note at the bottom of http://developer.postgresql.org/docs/postgres/catalog-pg-constraint.html (Someday we should get rid of consrc altogether.) Unfortunately it won't do to compare conbin either, because that will contain column numbers that won't necessarily match. I fear you'll have to actually reverse-compile the conbin strings and see if you get a match. regards, tom lane
В списке pgsql-hackers по дате отправления: