On Fri, Mar 23, 2001 at 07:41:51PM +0900, hiroko wrote:
> hi all
>
> we're switching our system from Unix-version to Linux-version,
> and from SQLplus to PostgreSQL
>
> the questions are about CREATING DB
>
> I found that FOREIGN KEY clause, which we need for our DB, is not
> implemented on PostgreSQL.
> that means you can't use DELETE CASCADE clause neither.
i'm using 7.0.3 (on debian potato)--
create table lookup (
major serial,
minor int4,
other ...
);
create table kahunamydata (
id serial,
...
MAJOR int4,
MINOR int4,
yada ...,
FOREIGN KEY(major,minor) REFERENCES lookup(major,minor) ON DELETE CASCADE,
...
primary key(id)
);
--
It is always hazardous to ask "Why?" in science, but it is often
interesting to do so just the same.
-- Isaac Asimov, 'The Genetic Code'
will@serensoft.com
http://newbieDoc.sourceforge.net/ -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!