Re: Foreign key constraint violation when using table inheritance - Mailing list pgsql-novice

From Tim Landscheidt
Subject Re: Foreign key constraint violation when using table inheritance
Date
Msg-id m38vnw1wz4.fsf@passepartout.tim-landscheidt.de
Whole thread Raw
In response to Foreign key constraint violation when using table inheritance  (Doug Wiebe <dwiebe@me.com>)
List pgsql-novice
Doug Wiebe <dwiebe@me.com> wrote:

> [...]
> What am I doing wrong?

<URI:http://www.postgresql.org/docs/current/static/ddl-inherit.html>:

| [...]

| 5.8.1. Caveats

| [...]

|   A serious limitation of the inheritance feature is that
| indexes (including unique constraints) and foreign key con-
| straints only apply to single tables, not to their inheri-
| tance children.  This is true on both the referencing and
| referenced sides of a foreign key constraint.  Thus, in the
| terms of the above example:

| [...]

| * Specifying that another table's column REFERENCES
|   cities(name) would allow the other table to contain city
|   names, but not capital names.  There is no good workaround
|   for this case.

| These deficiencies will probably be fixed in some future re-
| lease, but in the meantime considerable care is needed in
| deciding whether inheritance is useful for your application.

Tim

pgsql-novice by date:

Previous
From: Bob McConnell
Date:
Subject: Re: DBI, savepoints, transactions, and AutoCommit -- NOT A BUG
Next
From: Tim Landscheidt
Date:
Subject: Re: Query on DATETIME for a date (the whole day)