Re: suggestion: fix 'now' -> CURRENT_TIMESTAMP - Mailing list pgsql-bugs

From Mark Stosberg
Subject Re: suggestion: fix 'now' -> CURRENT_TIMESTAMP
Date
Msg-id slrndj8tkr.9sp.mark@simba.summersault.com
Whole thread Raw
In response to suggestion: fix 'now' -> CURRENT_TIMESTAMP  (Mark Stosberg <mark@summersault.com>)
List pgsql-bugs
On 2005-09-23, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Mark Stosberg <mark@summersault.com> writes:
>> Why not make the translation on the fly, since using 'now' and
>> timestamp() are not recommended practices anyway ?
>
> Because we can't retroactively fix 7.1.

That fact hadn't escaped me.

I was thinking that in *8*.1, the parsing of "CREATE TABLE" could be
altered to recognize the old syntax and improve it on the fly.

Since the meaning is identical, it seems like a reasonable improvement
to me.

This kind of rewriting is apparently already happening, because when I declare
a column as "serial", it's immediately translated into a different
representation.

test=# create table t (c1 serial);
test=# \d t
                           Table "public.t"
 Column |  Type   |                     Modifiers
--------+---------+---------------------------------------------------
 c1     | integer | not null default nextval('public.t_c1_seq'::text)


    Mark

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1878: Different execution plans for the same query.
Next
From: "T.J. Ferraro"
Date:
Subject: Re: HELP