Boolean SQL function ?

Поиск
Список
Период
Сортировка
От Bo Lorentsen
Тема Boolean SQL function ?
Дата
Msg-id 3B83AD75.91744798@netgroup.dk
обсуждение исходный текст
Ответы Re: Boolean SQL function ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Bo Lorentsen
Дата:
Сообщение: Re: Subquery and where clause ?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Boolean SQL function ?