Search Postgresql Archives

Re: foreign key constraints and inheritence

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

 



On Sat, Jul 16, 2005 at 05:39:59PM -0400, Garrett Kalleberg wrote:
> 
> Now, the rec with id '1234' is in the table  
> invoicelineiteminventorytypes, but I can't wrap my head around the  
> fact that
> 
> SELECT invoicelineitemtypeid FROM invoicelineitemtypes
> 
> yields the rec with invoicelineitemtypeid '1234', yet I can't  
> reference it in the invoicelines INSERT statement.

See the inheritance documentation:

http://www.postgresql.org/docs/8.0/static/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."

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[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