From: Luis Sousa <llsousa@ualg.pt>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql sql Mailing List <pgsql-sql@postgresql.org>
Subject: Re: Hidden Select
Date: Mon, 11 Jun 2001 17:27:37 +0100
Message-ID: <3B24F179.F2695957@ualg.pt> (raw)
References: <Pine.LNX.4.30.0106081830360.757-100000@peter.localdomain>
Suposing your example:
Now i want to do a query to the view like this:
SELECT * FROM C WHERE id=1;
I whant to chose the id, but that id isn't in my select list !!!?????
I hope you understand what i mean
Best regards
Luis Sousa
Peter Eisentraut wrote:
> Luis Sousa writes:
>
> > I have a query that joins several table with some restrictions.
> > I want to take out those restrictions from the query and create a view
> > that does not show the fields that are used to restrict the data, but in
> > some way, i can restrict that data when i call the view.
>
> Do you mean like this?
>
> create table A (id int, content text);
> create table B (id int, stuff numeric);
> create view C as select A.content, B.stuff from A, B where A.id = B.id;
>
> --
> Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: llsousa@ualg.pt, peter_e@gmx.net
Subject: Re: Hidden Select
In-Reply-To: <3B24F179.F2695957@ualg.pt>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox