Re: [HACKERS] Re: missing function datetime()
Thomas Lockhart <lockhart@alumni.caltech.edu>
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Moray McConnachie <moray.mcconnachie@computing-services.oxford.ac.uk>, pgsql-hackers@postgreSQL.org
Date: 2000-02-28T16:26:42Z
Lists: pgsql-hackers
> I can see two ways to do that: either add another function to pg_proc
> (five of them actually :-(), or hack the parser to translate a function
> name 'datetime' to 'timestamp'. Ugly as the second one sounds, it has
> a couple of advantages. First, it would provide an automatic upgrade
> path: future dumps of 7.0 databases would show the correct function
> name, at least for uses in rules. So we could hope to get rid of the
> compatibility hack someday. Second, the parser has special treatment
> for functions that are named the same as datatypes --- it knows they
> represent type coercions --- so a function named "datetime" won't really
> work quite the way it should for type resolution.
xlateSqlFunc() is already in gram.y; enjoy...
- Thomas
--
Thomas Lockhart lockhart@alumni.caltech.edu
South Pasadena, California