Skip site navigation (1) Skip section navigation (2)

Re: References to SERIAL

From: Thomas SMETS <tsmets(at)altern(dot)org>
To: "Brett W(dot) McCoy" <bmccoy(at)chapelperilous(dot)net>
Cc: psql sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: References to SERIAL
Date: 2000-12-30 22:43:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql

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.


> 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(at)altern(dot)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 ===========

In response to

pgsql-sql by date

Next:From: Thomas SMETSDate: 2000-12-31 01:25:51
Subject: Re: Looking for comments
Previous:From: Oliver ElphickDate: 2000-12-30 19:03:34
Subject: Re: References to SERIAL

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group