Comment 1987 added to page ddl-inherit.html of version 7.4

Поиск
Список
Период
Сортировка
От nobody
Тема Comment 1987 added to page ddl-inherit.html of version 7.4
Дата
Msg-id 200501131240.j0DCeisu011482@developer.pgadmin.org
обсуждение исходный текст
Список pgsql-www
Author: Diego Zuccato <diego@otello.alma.unibo.it>
----
Replicating PRIMARY KEY in child tables allows only referencing 'em from other tables. It doesn't solve the "duplicated
primarykey" problem in the parent table. The only way I could find is adding : 
CREATE OR REPLACE FUNCTION base_notexists(integer)
 RETURNS boolean
 STABLE
 LANGUAGE 'SQL'
 AS 'SELECT NOT EXISTS(SELECT id FROM base WHERE id=$1)';
and the constraint
 CHECK (base_notexists(id))

If only it could be possible to reference an already existing index...
----
Manual page: http://wwwmaster.postgresql.org/docs/7.4/interactive/ddl-inherit.html
Reject:      http://wwwmaster.postgresql.org/admin/comments.php?action=reject&id=1987
Edit:        http://wwwmaster.postgresql.org/admin/comment-edit.php?id=1987
Delete:      http://wwwmaster.postgresql.org/admin/comments.php?action=delete&id=1987


В списке pgsql-www по дате отправления:

Предыдущее
От: "John Hansen"
Дата:
Сообщение: Re: Search
Следующее
От: "Dave Page"
Дата:
Сообщение: FTP/Mirror selection