pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: sramsay@uga.edu
Cc: pgsql-sql@postgresql.org
Subject: Re: functions in WHERE clause
Date: Sun, 5 Mar 2006 10:26:35 -0700
Message-ID: <20060305172635.GA77911@winnie.fuhr.org> (raw)
In-Reply-To: <20060305151652.GA14216@cantor.english.uga.edu>
References: <20060305151652.GA14216@cantor.english.uga.edu>

On Sun, Mar 05, 2006 at 10:16:52AM -0500, sramsay@uga.edu wrote:
> I've got one of these:
> 
> SELECT * from some_table WHERE
> test_for_equality_is_syntactically_ugly;
> 
> What I'd like to do is encapsulate the WHERE clause in a function,
> but I'm having no end of trouble.

Would a view work?  If not then please provide a more concrete
example that shows what you're trying to do.

CREATE VIEW foo AS
SELECT * FROM some_table
WHERE test_for_equality_is_syntactically_ugly;

-- 
Michael Fuhr



view thread (11+ messages)  latest in thread

Message-ID: <20060305172635.GA77911@winnie.fuhr.org>
Permalink:  ../20060305172635.GA77911@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20060305172635.GA77911@winnie.fuhr.org

 · 

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: mike@fuhr.org, sramsay@uga.edu
  Subject: Re: functions in WHERE clause
  In-Reply-To: <20060305172635.GA77911@winnie.fuhr.org>

* 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