From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Implicit coercions need to be reined in |
Date: | 2001-11-22 17:03:32 |
Message-ID: | 1322.1006448612@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> One more thing is that instead of looking up a cast function from type A
> to type B as "returns A, is named A, takes arg B" it could be looked up as
> "returns A, takes arg B, is a cast function", which would generalize this
> whole thing a bit more.
I thought about that, but it would require keeping an extra index on
pg_proc (there's no efficient way to search by result type now). Not
clear that it's worth it, especially considering that there's really
only one reasonable name for a cast function anyway. What else would
you want to call it than the name of the destination type?
Also, this convention assures that there's at most *one* cast function
for any type coercion A to B. If the name could be anything then we'd
need some auxiliary mechanism to prevent conflicting cast functions
from being declared. Seems like a lot of mechanism for a dubious goal.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-11-22 17:18:33 | Re: Diff/Patch integration -> SQL cvs clone |
Previous Message | Tom Lane | 2001-11-22 16:57:58 | Re: OCTET_LENGTH is wrong |