Allowing SYSDATE to Work

From: "Matt Miller" <pgsql(at)mattmillersf(dot)fastmail(dot)fm>
To: pgsql-general(at)postgresql(dot)org
Subject: Allowing SYSDATE to Work
Date: 2006-11-17 22:26:37
Message-ID: 1163802397.5464.276316451@webmail.messagingengine.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

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.

I have much Oracle-specific code that references sysdate, and porting
would be easier if that syntax could work unchanged in Postgres.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bob Pawley 2006-11-17 22:26:57 After Update Triggers
Previous Message Tom Lane 2006-11-17 22:06:09 Re: can't delete because of constraint from zombie table

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2006-11-17 22:31:07 Re: Allowing SYSDATE to Work
Previous Message Tom Lane 2006-11-17 22:03:44 Re: Shutting down a warm standby database in 8.2beta3