Re: FK pointing to a VIEW

From: Lars Heidieker <lars(at)merlin(dot)de>
To: Olexandr Melnyk <omelnyk(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: FK pointing to a VIEW
Date: 2006-11-28 15:34:26
Message-ID: 66D6DBA8-60E9-40E6-A2F9-9B9D03031B5A@merlin.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 28 Nov 2006, at 13:33, Olexandr Melnyk wrote:

>
> Looks like I've missed your mail, so a late reply.
>
> 2006/11/11, Lars Heidieker <lars(at)merlin(dot)de>:
>
> > > > While I agree in principle that such a thing should be
> > > > able to be done, it simply isn't possible. (in PostgreSQL,
> you can't
> > > > even add an index to a view, which a unique constraint would
> depend
> > > > on).
> > >
> > > Agreed on that.
> > >
> > > But such an extension would require a view to be more than just
> > > SELECT.
> >
> > This would mean something like an index spreading over more then one
> > table in the end, or did I miss something ?
>
> Yes. But that is hardly implementable.
>

I think so too, propagating the changes in one of the views
underlying tables will be really hard,
as than the index of the view must be maintained as well as the
change to the view might cause
cascading...
While otherwise a view is simply a view, I don't know in how far this
can be done by something like
a materialized view (I think Oracle and DB2 etc have those)

- --

Viele Grüße,
Lars Heidieker

lars(at)heidieker(dot)de
http://paradoxon.info

- ------------------------------------

Mystische Erklärungen.
Die mystischen Erklärungen gelten für tief;
die Wahrheit ist, dass sie noch nicht einmal oberflächlich sind.
-- Friedrich Nietzsche

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFbFcIDAkIK9aNPuIRAoS/AJ9rvEwzTJrMkGAJ0PWUFFo/ftBCEACcCENd
nG0yYwita4L3nr4Tg0IJ7oU=
=kMo/
-----END PGP SIGNATURE-----

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ragnar 2006-11-28 15:44:09 Re: NULLs ;-)
Previous Message Vivek Khera 2006-11-28 15:21:49 Re: vacuum: out of memory error