Re: suggestion: fix 'now' -> CURRENT_TIMESTAMP

Mark Stosberg <mark@summersault.com>

From: Mark Stosberg <mark@summersault.com>
To: pgsql-bugs@postgresql.org
Date: 2005-09-23T21:42:02Z
Lists: 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