Re: Allowing SYSDATE to Work

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Allowing SYSDATE to Work
Date: 2006-11-17 23:55:08
Message-ID: 455E4BDC.1090905@cox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/17/06 16:31, Alvaro Herrera wrote:
> 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.

Or is he asking that this feature be added to PG?

- --
Ron Johnson, Jr.
Jefferson LA USA

Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFXkvcS9HxQb37XmcRAtwHAJ9+GBgAQHI9FoUhjGPmMgImb2cNfQCcC3zZ
2jk+k6ObhXKOZf+HV4j/OY8=
=5bRZ
-----END PGP SIGNATURE-----

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Matt Miller 2006-11-18 00:05:29 Re: [GENERAL] Allowing SYSDATE to Work
Previous Message Bob Pawley 2006-11-17 23:49:09 Re: After Update Triggers

Browse pgsql-hackers by date

  From Date Subject
Next Message Matt Miller 2006-11-18 00:05:29 Re: [GENERAL] Allowing SYSDATE to Work
Previous Message Tom Lane 2006-11-17 23:37:24 Re: Proposal: syntax of operation with tsearch's configuration