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

creating a constraint on the same table

From: "Matt Friedman" <matt(at)daart(dot)ca>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: creating a constraint on the same table
Date: 2001-01-18 20:52:16
Message-ID: 004801c08190$8abc16b0$e8804318@mattq3h8budilr (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
I have a category table with a primary key called cat_id
and another column called parent_id

the parent_id must be part of the cat_id column

it's alot like a foreign key constraint but I don't know the sql to do it.
any ideas?

Is this a novice question or should I try a different list?

Matt Friedman
Spry New Media
Lead Programmer/Partner
email: matt(at)sprynewmedia(dot)com
phone: 250 744 3655
fax: 250 370 0436

pgsql-novice by date

Next:From: Tom LaneDate: 2001-01-18 21:15:18
Subject: Re: ERROR: plpgsql: cache lookup from pg_proc failed -- Why?
Previous:From: Tom LaneDate: 2001-01-18 20:44:27
Subject: Re: Yikes! Bitten by line length?

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