Comment 1987 added to page ddl-inherit.html of version 7.4 - Mailing list pgsql-www

From nobody
Subject Comment 1987 added to page ddl-inherit.html of version 7.4
Date
Msg-id 200501131240.j0DCeisu011482@developer.pgadmin.org
Whole thread Raw
List 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 by date:

Previous
From: "John Hansen"
Date:
Subject: Re: Search
Next
From: "Dave Page"
Date:
Subject: FTP/Mirror selection