Re: Foreign key to a view (UNION of two or more tables), any alternative?

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Jose Gonzalez Gomez <jgonzalez(dot)openinput(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Foreign key to a view (UNION of two or more tables), any alternative?
Date: 2005-06-20 14:40:00
Message-ID: 20050620144000.GA25460@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Jun 19, 2005 at 17:16:34 +0100,
Jose Gonzalez Gomez <jgonzalez(dot)openinput(at)gmail(dot)com> wrote:
> >
> There would be no problem in doing so with such an easy case, but
> think about having a table with cities (hundred, thousands?) and then
> have four copies for each of the above posibilities with its related
> maintenance nightmare.

You still have to maintain the data somehow. I think it would be
easier with more cities to have a table holding the results rather
than try to hard code something into the table definition.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2005-06-20 14:54:27 Re: External (asynchronous) notifications of database updates
Previous Message Richard Huxton 2005-06-20 13:57:26 Re: Help! What has changed in the internal structure of