Re: Create Timestamp From Date and Time

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Create Timestamp From Date and Time
Дата
Msg-id 16748.1038522979@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Create Timestamp From Date and Time  ("Ron St.Pierre" <rstpierre@syscor.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: creating index works OK on one db, not on other
Следующее
От: Tom Lane
Дата:
Сообщение: Re: template0 1 psql -d .. (newbie)