Re: s/UNSPECIFIED/SIMPLE/ in foreign key code?
От | Gurjeet Singh |
---|---|
Тема | Re: s/UNSPECIFIED/SIMPLE/ in foreign key code? |
Дата | |
Msg-id | CABwTF4XPC-Vhvz6-ki1t++yqBJf1A_Jh66U8HBZVkEBMqd+5Ug@mail.gmail.com обсуждение исходный текст |
Ответ на | s/UNSPECIFIED/SIMPLE/ in foreign key code? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: s/UNSPECIFIED/SIMPLE/ in foreign key code?
|
Список | pgsql-hackers |
On Sat, Jun 16, 2012 at 5:38 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
For some reason I thought this change would break pg_upgrade, but then I came to me senses and realized pg_upgrade does not migrate/upgrade system tables.
The other candidate to look for possible breakage would be pgAdmin. As Amit says, there might be code out in the wild that does look at this column, so not worth breaking them for this small gain.
A small flaw in this plan is that in pg_constraint.confmatchtype,
MATCH_UNSPECIFIED is stored as 'u'. In a green field I'd just rename
that to 's' for SIMPLE, but it seems possible that this would confuse
client-side code such as pg_dump or psql. A quick look shows that
neither of those programs actually look directly at
pg_constraint.confmatchtype, instead relying on backend functions when
they want to deconstruct a foreign key constraint. But there could well
be other client code that would notice the change. So I'm a bit torn
as to whether to change it and create a release-note-worthy
compatibility issue, or to leave it as-is (with documentation notes that
"u" for MATCH_SIMPLE is a historical accident).
Thoughts?
For some reason I thought this change would break pg_upgrade, but then I came to me senses and realized pg_upgrade does not migrate/upgrade system tables.
The other candidate to look for possible breakage would be pgAdmin. As Amit says, there might be code out in the wild that does look at this column, so not worth breaking them for this small gain.
Regards,
--
Gurjeet Singh
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: