Re: functions in WHERE clause - Mailing list pgsql-sql

From Michael Fuhr
Subject Re: functions in WHERE clause
Date
Msg-id 20060305172635.GA77911@winnie.fuhr.org
Whole thread Raw
In response to functions in WHERE clause  (sramsay@uga.edu)
Responses Re: functions in WHERE clause
List pgsql-sql
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


pgsql-sql by date:

Previous
From: sramsay@uga.edu
Date:
Subject: functions in WHERE clause
Next
From: sramsay@uga.edu
Date:
Subject: Re: functions in WHERE clause