pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Gary Stainburn <gary.stainburn@ringways.co.uk>
Cc: pgsql-sql@postgresql.org
Subject: Re: references definition to multi-field primary key
Date: Fri, 16 Aug 2002 10:59:11 -0500
Message-ID: <20020816155911.GA15999@wolff.to> (raw)
In-Reply-To: <200208161615.57616.gary.stainburn@ringways.co.uk>
References: <200208161615.57616.gary.stainburn@ringways.co.uk>

On Fri, Aug 16, 2002 at 16:15:57 +0100,
  Gary Stainburn <gary.stainburn@ringways.co.uk> wrote:
> 
> I only want the insert to work if prpid matches pgpid and prnozzle matches 
> pgnozzle.

There are several typos in your sample that make it hard to know for
sure what you want to do. However I suspect you just want to add a
foreign key clause to your table definition. These can refer to more
than one column (unlike references). My memory is that you need a matching
unique index defined for the table you are referencing.



view thread (2+ messages)

Message-ID: <20020816155911.GA15999@wolff.to>
Permalink:  ../20020816155911.GA15999@wolff.to/
Also on:    postgresql.org/message-id/20020816155911.GA15999@wolff.to

 · 

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: bruno@wolff.to, gary.stainburn@ringways.co.uk
  Subject: Re: references definition to multi-field primary key
  In-Reply-To: <20020816155911.GA15999@wolff.to>

* 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