pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas SMETS <tsmets@altern.org>
To: Brett W. McCoy <bmccoy@chapelperilous.net>
Cc: psql sql <pgsql-sql@postgresql.org>
Subject: Re: References to SERIAL
Date: Sat, 30 Dec 2000 23:43:22 +0100
Message-ID: <3A4E650A.9F682D@altern.org> (raw)
References: <Pine.LNX.4.30.0012301316430.11787-100000@chapelperilous.net>

 
Yeap,

Tx Brett. The syntaxe you gave means much more to me than the one I got
from the Book "PostresSQL : Introduction & Concept" from Bruce Momjian
seems a bit short while the PostgreSQL user guide from Thomas LOCKHART
has the full theorical description.

I'll probably stick more with the second one in the future.

Thomas, 



> 
> You mean as a foreign key?  You would do something like
> 
> create table books_authors (
>         book integer references book(book_pk)
>                 on delete no action,
>         author integer references author(author_pk)
>                 on delete no action,
>         ...
> );
> 
> This forces integrity between the tables so the only allowable values in
> the books_authors table are those values in the referenced fields (foreign
> keys).
> 
> You will probably want to look up the documentation on contraints and
> foreign keys (I believe they are under the CREATE TABLE documentation).
> 

-- 
Sat Dec 30 15:23:42 CET 2000

Thomas SMETS                        e-mail : tsmets@altern.org
Av. de la Brabançonne 133 / 3       Tel. : +32 (0)2 742. 05. 94.
1030 Bruxelles
======= Quote of the Day =========
"In the long run, every program becomes rococo, and then rubble."
-- Alan Perlis
========= End of Quote ===========



view thread (4+ messages)

Message-ID: <3A4E650A.9F682D@altern.org>
Permalink:  ../3A4E650A.9F682D@altern.org/
Also on:    postgresql.org/message-id/3A4E650A.9F682D@altern.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tsmets@altern.org, bmccoy@chapelperilous.net
  Subject: Re: References to SERIAL
  In-Reply-To: <3A4E650A.9F682D@altern.org>
  References: <Pine.LNX.4.30.0012301316430.11787-100000@chapelperilous.net> <3A4E650A.9F682D@altern.org>

* 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