Re: Cross-table constraints

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Rodger Donaldson <rodgerd(at)diaspora(dot)gen(dot)nz>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Cross-table constraints
Date: 2003-01-29 06:13:59
Message-ID: 20030128221313.F4312-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Wed, 29 Jan 2003, Rodger Donaldson wrote:

> > On Tue, 28 Jan 2003, Rodger Donaldson wrote:
> >
> > > Now, adding a UNIQUE constraint on the pk for add_queue weeds out
> > > dupes there. However, attempting to add a cross-table UNIQUE check
> > > with:
> > >
> > > alter table add_queue add constraint add_queue_no_dupe_sites unique
> > > (sites.url);
> > > ERROR: parser: parse error at or near "."
> > >
> > > ,,,fails. Foreign key constraints will only require a match (of one
> > > sort or another) in the foreign table, according to the postgresql
> 7.2
> > > documentation, and do not have an option to require no match.
> > >
> > > Am I missing something obvious (syntax for UNIQUE, for example), or
> > > trying to do something that just doesn't work that way?
> >
> > I'm not sure what a unique constraint on sites.url on table add_queue
> > is supposed to mean precisely.
>
> Sorry; to clarify, it's table.column notation.

I meant to signify what's the behavior? Is it different from a unique
constraint on sites(url)? If so, how?

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2003-01-29 06:44:57 Re: Creating tables from within functions
Previous Message Rodger Donaldson 2003-01-29 06:11:43 Re: Cross-table constraints