Boolean SQL function ? - Mailing list pgsql-novice

From Bo Lorentsen
Subject Boolean SQL function ?
Date
Msg-id 3B83AD75.91744798@netgroup.dk
Whole thread Raw
Responses Re: Boolean SQL function ?  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-novice by date:

Previous
From: Bo Lorentsen
Date:
Subject: Re: Subquery and where clause ?
Next
From: Tom Lane
Date:
Subject: Re: Boolean SQL function ?