Re: dynamic views - Mailing list pgsql-general

From Richard Huxton
Subject Re: dynamic views
Date
Msg-id 200402241659.04307.dev@archonet.com
Whole thread Raw
In response to dynamic views  (sferriol <sylvain.ferriol@imag.fr>)
List pgsql-general
On Tuesday 24 February 2004 16:29, sferriol wrote:
> hello
> is it possible with postgres 7.2 or more, to define a dynamic view.
> For example, i have a table with a column 'user'
> and i want to define a view which gives infomrations from different
> tables but the user  has to specifie the 'user' parameter when using a
> select to the view

You can have a view something like:

SELECT * FROM personal_info WHERE owner = CURRENT_USER;

There are some other vars/functions too SESSION_USER and current_database()
etc.

--
  Richard Huxton
  Archonet Ltd

pgsql-general by date:

Previous
From: "Paul Simpson"
Date:
Subject: Re: Why does app fail?
Next
From: Sean Shanny
Date:
Subject: Re: Found this in the server log on MAC OSX