triggers/constraints?

Поиск
Список
Период
Сортировка
От ako...
Тема triggers/constraints?
Дата
Msg-id 1128716770.541839.284900@g49g2000cwa.googlegroups.com
обсуждение исходный текст
Ответы Re: triggers/constraints?  (Terry Lee Tucker <terry@esc1.com>)
Список 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 по дате отправления:

Предыдущее
От: Matthew Story
Дата:
Сообщение: Re: What Front-End you suggest ?
Следующее
От: Nikolay Samokhvalov
Дата:
Сообщение: Re: PostgreSQL Gotchas