Re: IFNULL -> COALESCE

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: IFNULL -> COALESCE
Дата
Msg-id 20020209011111.J14715-100000@houston.familyhealth.com.au
обсуждение исходный текст
Ответ на IFNULL -> COALESCE  (Lee Kindness <lkindness@csl.co.uk>)
Ответы Re: IFNULL -> COALESCE  (Lee Kindness <lkindness@csl.co.uk>)
Список pgsql-hackers
> Guys, I've recently being going back over code from Ingres and porting
> it over to PostgreSQL. Heavy use was made of the IFNULL function, this
> function simply returns the 2nd argument if the first is
> NULL. Consider the following query:
>
>  SELECT COALESCE(MAX(id), 0) + 1 from test;
>
> can be replaced by the following PostgreSQL query:
>
>  SELECT COALESCE(MAX(id), 0) + 1 from test;

Ummm...did you make a mistake here?  Those statements are identical...

Chris



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Summary of new configuration file and data directory
Следующее
От: Tom Lane
Дата:
Сообщение: Re: GiST on 64-bit box