pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andre Schubert <andre.schubert@km3.de>
To: pgsql-sql@postgresql.org
Subject: REFERENCES
Date: Fri, 08 Mar 2002 13:28:33 +0100
Message-ID: <3C88AE71.A170FCAC@km3.de> (raw)

Hi,

i have a simple problem and wont request assistance fro m this list.
i have to tables

foo:
	id int8 UNIQUE

bar:
	id int8 UNIQUE
	foo_id int8

Now i wont foo_id to be a id which exists in the foo, this could be done
with foo_id REFERENCES foo (id).
But what should i do if i want foo_id to be a id existing in foo or to
be zero(0).
I have created a view as "select id from foo UNION select 0" and tried
to REFERENCE against this view, but that
doesnt work.
Can this problem be solved by a somebody ????

Thanks

-- 
Andre Schubert            EMail:   Andre.Schubert@km3.de
                          Tel:     03774 6625-78
km3 teledienst GmbH       Fax:     03774 6625-79



view thread (6+ messages)  latest in thread

Message-ID: <3C88AE71.A170FCAC@km3.de>
Permalink:  ../3C88AE71.A170FCAC@km3.de/
Also on:    postgresql.org/message-id/3C88AE71.A170FCAC@km3.de

 · 

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: andre.schubert@km3.de
  Subject: Re: REFERENCES
  In-Reply-To: <3C88AE71.A170FCAC@km3.de>

* 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