pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Rodger Donaldson <rodgerd@diaspora.gen.nz>
Cc: pgsql-sql@postgresql.org
Subject: Re: Cross-table constraints
Date: Tue, 28 Jan 2003 22:13:59 -0800 (PST)
Message-ID: <20030128221313.F4312-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <E18dlRn-0005Hl-00@israel.diaspora.gen.nz>


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?




view thread (5+ messages)  latest in thread

Message-ID: <20030128221313.F4312-100000@megazone23.bigpanda.com>
Permalink:  ../20030128221313.F4312-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20030128221313.F4312-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, rodgerd@diaspora.gen.nz
  Subject: Re: Cross-table constraints
  In-Reply-To: <20030128221313.F4312-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox