triggers/constraints? - Mailing list pgsql-general

From ako...
Subject triggers/constraints?
Date
Msg-id 1128716770.541839.284900@g49g2000cwa.googlegroups.com
Whole thread Raw
Responses Re: triggers/constraints?  (Terry Lee Tucker <terry@esc1.com>)
List 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


pgsql-general by date:

Previous
From: Matthew Story
Date:
Subject: Re: What Front-End you suggest ?
Next
From: Nikolay Samokhvalov
Date:
Subject: Re: PostgreSQL Gotchas