Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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 ..



pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group