Re: difference between current_timestamp and now() in quotes

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Adrian Klaver <aklaver(at)comcast(dot)net>
Cc: pgsql-general(at)postgresql(dot)org, Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
Subject: Re: difference between current_timestamp and now() in quotes
Date: 2009-01-22 18:04:05
Message-ID: 20090122180405.GI4296@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrian Klaver escribió:

> At least on 8.2 'now()' does not work either at least not in the way I think
> you want. I get:
>
> test=# SELECT 'now()';
> ?column?
> ----------
> now()
> (1 row)

alvherre=# select 'now()'::unknown::timestamptz;
timestamptz
-------------------------------
2009-01-22 15:01:46.352979-03
(1 fila)

It even works if you use "text" instead of unknown.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2009-01-22 18:14:06 Re: difference between current_timestamp and now() in quotes
Previous Message Reg Me Please 2009-01-22 18:01:59 Re: Resp.: difference between current_timestamp and now() in quotes