pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: James Orr <james@lrgmail.com>
To: Glenn MacGregor <gtm@oracom.com>
To: pgsql-sql@postgresql.org
Subject: Re: View question
Date: Wed, 28 Nov 2001 10:38:41 -0500
Message-ID: <000c01c17822$c255ab20$1600000a@lrg.office> (raw)
References: <012e01c17815$f6f85240$4d00a8c0@catamount>

Hi Glenn,

Just make the column "type" part of the view.  Then use a WHERE when you
select from the view.

- James

----- Original Message -----
From: "Glenn MacGregor" <gtm@oracom.com>
To: <pgsql-sql@postgresql.org>
Sent: Wednesday, November 28, 2001 9:07 AM
Subject: [SQL] View question


Hi All,

Thanks Josh for the help on the last question.  Is there a way to create a
view so I can insert parameters?
The docs have the example:

create view kinds as select * from movies where type = 'Comedy';

select * from kinds;

What if I want a view where the type is a variable?  Is there a way to pass
data along?

    Thanks

        Glenn





view thread (2+ messages)

Message-ID: <000c01c17822$c255ab20$1600000a@lrg.office>
Permalink:  ../000c01c17822$c255ab20$1600000a@lrg.office/
Also on:    postgresql.org/message-id/000c01c17822$c255ab20$1600000a@lrg.office

 · 

reply

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: james@lrgmail.com, gtm@oracom.com
  Subject: Re: View question
  In-Reply-To: <000c01c17822$c255ab20$1600000a@lrg.office>

* 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