Search Postgresql Archives

Re: [pgsql] inherits and foreign key problem

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

 



am  Tue, dem 24.04.2007, um 10:30:15 +0800 mailte Magicloud Magiclouds folgendes:
> Dear all,
>    I have some tables like below, and now i have one record for each
> in simple_texts, simple_directories and side_types. Now I want to
> insert one record into sides (from simple_directory to simple_text
> with side_type), but it report error: can not insert or update
> "sides", against foreign key "sides_from_fkey". detail: key (from)=(2)
> is not present in table "base_nodes".
>    How does this happen? How to resolve?

Quotation from
http://www.postgresql.org/docs/current/interactive/ddl-inherit.html :

A serious limitation of the inheritance feature is that indexes
(including unique constraints) and foreign key constraints only apply to
single tables, not to their inheritance children. This is true on both
the referencing and referenced sides of a foreign key constraint.


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net


[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