On 02/06/11 10:53, wcting163(at)163(dot)com wrote:
> but, what about "prepare p1 as select 'today'::timestamp"??
> today() is not a builtin function, we can't change it to "select
> today()::timestamp";
The keyword-to-timestamp conversions are ugly historical hacks.
Use the SQL-standard current_date, current_time, and current_timestamp
keywords instead.
http://www.postgresql.org/docs/current/static/functions-datetime.html#FUNCTIONS-DATETIME-CURRENT
--
Craig Ringer