Re: functions in WHERE clause

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: sramsay(at)uga(dot)edu
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: functions in WHERE clause
Date: 2006-03-05 17:26:35
Message-ID: 20060305172635.GA77911@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Sun, Mar 05, 2006 at 10:16:52AM -0500, sramsay(at)uga(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message sramsay 2006-03-05 17:48:27 Re: functions in WHERE clause
Previous Message sramsay 2006-03-05 15:16:52 functions in WHERE clause