Re: Referential Integrity thru Views - Mailing list pgsql-general

From GH
Subject Re: Referential Integrity thru Views
Date
Msg-id 20010804052238.E48649@over-yonder.net
Whole thread Raw
In response to Referential Integrity thru Views  ("Kapil Tilwani" <karan_pg_2@yahoo.com>)
List pgsql-general
On Fri, Aug 03, 2001 at 11:35:25PM +0530, some SMTP stream spewed forth:
> Hi,
>         Right now, I am enforcing uniqueness in three different tables (Supplier, Customer, Ledger) thru the
front-endby checking thru a Union Query.  Is it possible to enforce such a uniquenessthru in the DB.   
>
>         Irrespective of the above, is it possible to have a foreign key check in this (???)

Yes.

If you mean supporting uniqueness in views, you would have to enforce
uniqueness on the underlying tables.
You can do this using "create table ... primary key" and "references"
as well as foreign key triggers.

The documentation is actually quite good on these, IIRC.

> Thanx,
> Kapil

gh
--
What, no one sings along with Ricky Martin anymore?
My kid sister does (but then, she prefers pico to vi ...)
    -- Suresh Ramasubramanian, alt.sysadmin.recovery

pgsql-general by date:

Previous
From: "Kapil Tilwani"
Date:
Subject: Referential Integrity thru Views
Next
From: GH
Date:
Subject: Re: Index-speeds