Re: Allowing SYSDATE to Work

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Allowing SYSDATE to Work
Дата
Msg-id 20061117223107.GF5293@alvh.no-ip.org
обсуждение исходный текст
Ответ на Allowing SYSDATE to Work  ("Matt Miller" <pgsql@mattmillersf.fastmail.fm>)
Ответы Re: Allowing SYSDATE to Work  (Ron Johnson <ron.l.johnson@cox.net>)
Список pgsql-general
Matt Miller wrote:
> I'd like SYSDATE to work syntactically and semantically the same as
> CURRENT_TIMESTAMP (or CURRENT_TIME, or whatever).  I can create a
> function called "sysdate" that does the trick, but then it seems I have
> to reference the function as "sysdate ()," but I want to be able to get
> away with just "sysdate."  It seems that CURRENT_TIMESTAMP and their
> friends are magic functions that can be referenced without an explicit
> empty argument list.

current_time and the like are hardcoded in the grammar.  You'd have to
do the same for sysdate.  It's not hard, but then I'd question the
hassle of having to patch all the Postgres installations you're going to
want to run your code on.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

В списке pgsql-general по дате отправления:

Предыдущее
От: Bob Pawley
Дата:
Сообщение: After Update Triggers
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: SPI