Re: Create Timestamp From Date and Time - Mailing list pgsql-general

From Tom Lane
Subject Re: Create Timestamp From Date and Time
Date
Msg-id 16748.1038522979@sss.pgh.pa.us
Whole thread Raw
In response to Re: Create Timestamp From Date and Time  ("Ron St.Pierre" <rstpierre@syscor.com>)
List pgsql-general
"Ron St.Pierre" <rstpierre@syscor.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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: creating index works OK on one db, not on other
Next
From: Tom Lane
Date:
Subject: Re: template0 1 psql -d .. (newbie)