Received: from corvette.mascari.com (dhcp065-024-158-068.columbus.rr.com [65.24.158.68]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0N1KBl69469 for ; Tue, 22 Jan 2002 20:20:11 -0500 (EST) (envelope-from mascarm@mascari.com) Received: from mascari.com (ferrari.mascari.com [192.168.2.1]) by corvette.mascari.com (8.9.3/8.9.3) with ESMTP id UAA30752 for ; Tue, 22 Jan 2002 20:15:29 -0500 Message-ID: <3C4E0EB1.1E3687FD@mascari.com> Date: Tue, 22 Jan 2002 20:15:29 -0500 From: Mike Mascari X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-hackers@postgresql.org Subject: Re: RFD: schemas and different kinds of Postgres objects References: <29436.1011744140@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200201/1013 X-Sequence-Number: 18001 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