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