Search Postgresql Archives

coalesce seems to give strange results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everyone,

Looks like I'm encountering some quirks with coalesce()...

> postgres=# select coalesce(null,0);
>  coalesce 
> ----------
>         0
> (1 row)
> 
> postgres=# SELECT COALESCE(ROUND(EXTRACT(epoch FROM now()-query_start)),0) FROM pg_stat_activity WHERE current_query = '<IDLE> in transaction';
>  coalesce 
> ----------
> (0 rows)
> 
> postgres=# select version();
>                                                       version                                                      
> -------------------------------------------------------------------------------------------------------------------
>  PostgreSQL 8.4.2 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44), 64-bit
> (1 row)

Any ideas?
--Richard
-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux