Skip site navigation (1) Skip section navigation (2)

Re: expression evaluation with expected datatypes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: expression evaluation with expected datatypes
Date: 2012-07-10 15:49:49
Message-ID: 22439.1341935389@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Excerpts from Tom Lane's message of mar jul 10 10:56:50 -0400 2012:
>> What's to solve?  Presumably the WITH function name would take
>> precedence over anything in the catalogs, the same as WITH query names
>> take precedence over actual tables.

> Hm, would the newly defined function mask all regular functions with
> that name?

Only the ones with the same parameter types ...

> If not, a seemingly innocuous change in a query could mean
> calling not the function defined in the WITH FUNCTION clause but another
> one with the same name but different parameter count/types.

I would see this working as if the WITH function appeared in a schema
earlier in the search path than any regular functions.  So the risk is
not greater, nor indeed different, than from any other overloaded
function name.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2012-07-10 15:50:18
Subject: Using pg_upgrade on log-shipping standby servers
Previous:From: Daniel FarinaDate: 2012-07-10 15:46:46
Subject: Re: Synchronous Standalone Master Redoux

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group