From: Mike Mascari <mascarm@mascari.com>
To: pgsql-hackers@postgresql.org
Subject: Re: RFD: schemas and different kinds of Postgres objects
Date: Tue, 22 Jan 2002 20:15:29 -0500
Message-ID: <3C4E0EB1.1E3687FD@mascari.com> (raw)
References: <Pine.LNX.4.30.0201221824360.686-100000@peter.localdomain>
<29436.1011744140@sss.pgh.pa.us>
Tom Lane wrote:
>
> I'm particularly troubled by the idea of trying to apply this "any"
> lookup concept to resolution of overloaded operators and functions.
> Suppose I have a reference func(type1,type2) that I'm trying to resolve,
> and I have an inexact match (one requiring coercion) in my own schema.
> Do I look to the "any" schema to see if there are better matches?
> If so, what happens if the "any" schema contains multiple possibilities
> with identical signatures (presumably created by different users)? ISTM
> this will positively guarantee a resolution failure, since there's no
> way for the resolver to prefer one over another. Thus, by creating
> a "func(foo,bar)" function --- quite legally --- JRandomLuser might
> break other people's formerly working queries that use other functions
> named func. Although it's possible for this to happen now, it'll be
> a lot more surprising if JRandomLuser thinks that his functions live
> in his own private schema namespace.
>
So, in a nutshell, the price we pay for function overloading is the
inability to have schema-specific functions. Right? Possibly why Oracle
doesn't allow function overloading? As a user, I'd much rather have
schema-specific functions than only global. I'm not downplaying the
value of function overloading, but if I had the choice (which I guess I
can't/won't), I'd choose schema-specific functions over function
overloading...
Mike Mascari
mascarm@mascari.com
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: mascarm@mascari.com
Subject: Re: RFD: schemas and different kinds of Postgres objects
In-Reply-To: <3C4E0EB1.1E3687FD@mascari.com>
* 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