Re: Create Timestamp From Date and Time

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ron St(dot)Pierre" <rstpierre(at)syscor(dot)com>
Cc: Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>, pgsql-general(at)postgresql(dot)org
Subject: Re: Create Timestamp From Date and Time
Date: 2002-11-28 22:36:19
Message-ID: 16748.1038522979@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Ron St.Pierre" <rstpierre(at)syscor(dot)com> writes:
> Example - when I run the following:
> select timestamp(date '1998-02-24',time '23:07')
> I get the following error:
> parse error at or near "date"

"timestamp" is a reserved word these days, so to use it as a function
name you must double-quote it.

regression=# select timestamp(date '1998-02-24',time '23:07');
ERROR: parser: parse error at or near "date" at character 18
regression=# select "timestamp"(date '1998-02-24',time '23:07');
timestamp
---------------------
1998-02-24 23:07:00
(1 row)

Kinda messy, but the alternative of choosing a different name for this
function doesn't seem very palatable either...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-11-28 22:39:20 Re: template0 1 psql -d .. (newbie)
Previous Message Tom Lane 2002-11-28 22:24:00 Re: creating index works OK on one db, not on other