Search Postgresql Archives

triggers/constraints?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux