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>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Re: missing function datetime()
Date: Mon, 28 Feb 2000 16:26:42 +0000
Message-ID: <38BAA1C2.65971352@alumni.caltech.edu> (raw)
References: <Pine.LNX.4.21.0002241604480.17558-100000@net-srv-0001.bvrd.com>
<23337.951436670@sss.pgh.pa.us>
<006e01bf7f81$b9a91d40$760e01a3@oucs.ox.ac.uk>
<7619.951496583@sss.pgh.pa.us>
> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: lockhart@alumni.caltech.edu, tgl@sss.pgh.pa.us, moray.mcconnachie@computing-services.oxford.ac.uk, pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Re: missing function datetime()
In-Reply-To: <38BAA1C2.65971352@alumni.caltech.edu>
References: <Pine.LNX.4.21.0002241604480.17558-100000@net-srv-0001.bvrd.com> <23337.951436670@sss.pgh.pa.us> <006e01bf7f81$b9a91d40$760e01a3@oucs.ox.ac.uk> <7619.951496583@sss.pgh.pa.us> <38BAA1C2.65971352@alumni.caltech.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox