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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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
http://www.sprynewmedia.com
Lead Programmer/Partner
email: matt(at)sprynewmedia(dot)com
phone: 250 744 3655
fax: 250 370 0436

Browse pgsql-novice by date

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