Skip site navigation (1) Skip section navigation (2)

Re: schema-qualified SET CONSTRAINTS

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: schema-qualified SET CONSTRAINTS
Date: 2006-04-11 02:35:44
Message-ID: 3055.1144722944@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Kris Jurka <books(at)ejurka(dot)com> writes:
> The attached patch allows SET CONSTRAINTS to take a schema qualified 
> constraint name (myschema.t1_fk_t2) and when given a bare constraint name 
> it uses the search_path to determine the matching constraint instead of 
> the previous behavior of disabling all identically named constraints.

This patch seems egregiously non backwards compatible :-(.  A behavior
that would be backwards compatible is to retain the previous behavior
given an un-qualified name, while if given a schema-qualified name,
modify all matching constraints within that schema.  That doesn't seem
very self-consistent though.  A compromise that might succeed in making
*everybody* unhappy would be for the unqualified-name case to only
affect constraints that are visible in the current search path (but
affect all of them, not only one as in this patch).

Given the fundamental point that we don't insist on uniqueness of
constraint names within schemas, I'm not sure that the spec gives us
any useful guidance on what SET CONSTRAINTS should affect.

Anyway, I'm not sure what to do, but I am sure it requires some
discussion not just a patch.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2006-04-11 02:45:08
Subject: Re: plpgsql by default (was: Re: Remote administration contrib module)
Previous:From: Bruce MomjianDate: 2006-04-11 02:09:00
Subject: Re: Domains as Subtypes

pgsql-patches by date

Next:From: Tom LaneDate: 2006-04-11 03:13:59
Subject: Re: Patch for bug #2073 (Can't drop sequence when created via SERIAL column)
Previous:From: Kris JurkaDate: 2006-04-11 00:05:09
Subject: schema-qualified SET CONSTRAINTS

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group