Boolean SQL function ?

From: Bo Lorentsen <bl(at)netgroup(dot)dk>
To: pgsql-novice(at)postgresql(dot)org
Subject: Boolean SQL function ?
Date: 2001-08-22 13:02:45
Message-ID: 3B83AD75.91744798@netgroup.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi ...

This time I'm really lost :-)

How does one write a SQL FUNCTION that works in a WHERE clause ?

If fx. I like to make a function called "is_today" that take two dates
and test if they are within the same day, how can I express this in SQL
?

I cant make a "SELECT 1 WHERE EXTRACT( day ...", so how does one return
a boolean ?

Hopefull regards ..

/BL

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2001-08-22 14:31:09 Re: Boolean SQL function ?
Previous Message Bo Lorentsen 2001-08-22 12:34:58 Re: Subquery and where clause ?