Re: SET CONSTRAINTS not schema-aware

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SET CONSTRAINTS not schema-aware
Date: 2003-05-11 17:49:44
Message-ID: 20030511174944.GB710@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, May 11, 2003 at 18:46:32 +0200,
Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> SET CONSTRAINTS doesn't allow you to schema-qualify a constraint name.
> Here's an example:
>
> create schema test;
> create table test.foo (a int primary key);
> create table test.bar (b int primary key, c int constraint myconstraint references test.foo);
>
> -- This succeeds even though schema "test" is not in the search path:
> set constraints myconstraint immediate;
>
> -- This is what should work:
> set constraints test.myconstraint immediate;
> ERROR: parser: parse error at or near "." at character 21
>
> Comments?

I am pretty sure I saw some comments in the discussion about sequence
naming that constraints are per table and giving them a schema name
makes no sense. The table they are for has the schema name in it.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 2003-05-11 18:26:18 tsearch upgrade documentation needed
Previous Message Bruno Wolff III 2003-05-11 17:47:52 Re: problem building tablefunc in 7.4