triggers/constraints?

From: "ako(dot)(dot)(dot)" <akonsu(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: triggers/constraints?
Date: 2005-10-07 20:26:10
Message-ID: 1128716770.541839.284900@g49g2000cwa.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hello,

consider a sample table:

create table item (id serial, parent_id int, path varchar(256));

"id" is a unique identifier of each row,
"parent_id" is an id of another row in the same table or null

what is the right way in postgresql to ensure that the "path" field of
a given row is a prefix of the "path" field of the row referenced by
the "parent_id" field? check constraints? triggers?

please advice, i am new.

thanks in advance
konstantin

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jaime Casanova 2005-10-07 20:26:39 Re: Using cursors...
Previous Message Marc G. Fournier 2005-10-07 20:14:12 Re: [GENERAL] Oracle buys Innobase