Re: difference between current_timestamp and now() in quotes

From: Adrian Klaver <aklaver(at)comcast(dot)net>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
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:14:06
Message-ID: 200901221014.06999.aklaver@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday 22 January 2009 10:04:05 am Alvaro Herrera wrote:
> 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.

I see my problem I was just doing a select. When I did an insert into a
timestamp field than the 'now()' form worked. Learn something new everyday :)

--
Adrian Klaver
aklaver(at)comcast(dot)net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message decibel 2009-01-22 18:16:36 Re: deductive databases in postgreSQL
Previous Message Alvaro Herrera 2009-01-22 18:04:05 Re: difference between current_timestamp and now() in quotes