From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Michael Fuhr <mike(at)fuhr(dot)org> |
Cc: | NosyMan <nosyman(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: test datatype for ANY |
Date: | 2005-02-12 03:02:29 |
Message-ID: | 17733.1108177349@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Michael Fuhr <mike(at)fuhr(dot)org> writes:
> On Fri, Feb 11, 2005 at 03:37:01PM -0500, Tom Lane wrote:
>> [ thinks about that for awhile... ] Oh, I see. The reason this appears
>> to work is that plpgsql compiles a separate version of the function for
>> each actual parameter datatype that is used in a given session. So in
>> your example, you get a separate version for integer, numeric, etc.
> Is that the general case for polymorphic functions?
AFAIR all the PLs that support polymorphism do it that way. It's not
the only way it could be done, but it was the easiest way to bolt
polymorphism onto the existing code, which generally assumed that
every data value in the function has a fixed datatype.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2005-02-12 03:56:33 | Re: regular expressions in query |
Previous Message | Tom Lane | 2005-02-12 02:58:03 | Re: pg_dump dumping data in order? (used to in 7.4 but not now in 8?) |