Re: Move postgresql_fdw_validator into dblink - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Move postgresql_fdw_validator into dblink
Date
Msg-id CA+TgmobzOCV9RWUXO=xM_NkzrmPYZ0LgVuWhxyzueThZEqJHqw@mail.gmail.com
Whole thread Raw
In response to Re: Move postgresql_fdw_validator into dblink  (Shigeru HANADA <shigeru.hanada@gmail.com>)
Responses Re: Move postgresql_fdw_validator into dblink
List pgsql-hackers
On Fri, Oct 19, 2012 at 7:17 AM, Shigeru HANADA
<shigeru.hanada@gmail.com> wrote:
> However, I'm not sure where that leaves us with respect to the original
> goal of getting rid of use of that function name.  Thoughts?
>
> Sorry, I had misunderstood the problem :-(.  In my proposal, postgresql_fdw
> uses public schema, as other contrib modules do, so its validator can live
> with existing pg_catalog.postgresql_fdw_validator.  IMHO we should
> remove  postgresql_fdw_validator sooner or later, but we don't need to hurry
> to remove existing postgresql_fdw_validator from core.
>
> Of course we must ensure that postgresql_fdw never uses in-core validator,
> and dblink and other product never use postgresql_fdw's validator.  To
> achieve this, how about to use a schema, say postgresql_fdw, for
> postgresql_fdw by specifying "schema" option in extension control file?
> We need to qualify function names, so relocatable should be false.  This
> requires users of postgresql_fdw to set search_path or qualify
> postgresql_fdw's functions and views every time, but it seems acceptable.
>
> In addition, this approach would prevent pollution of public schema.

It seems to me that this is a case of the tail wagging the dog.  The
original reason we ran into this issue is because there were some
people (I forget who, sorry) who insisted that this had to be renamed
from pgsql_fdw to postgresql_fdw.  That change then caused this naming
conflict.  Now, normally what we do if we have a naming conflict is we
rename one of the two things so that we don't have a naming conflict.
If we've determined that we can't rename postgresql_fdw_validator for
reasons of backward compatibility, then we should rename this new
thing instead.  We of course do not have to use the original
pgsql_fdw_validator name; it can be postgres_fdw_validator or
postgree_fdw_validator or prostgreskewell_fdw_validator or whatever
the consensus bikeshed position is.  Moving it to another schema does
not particularly appeal to me as it seems that having two
identically-named validators in different schemas will be even more
confusing than having two similarly-named validators in the same
schema.

If we're unwilling to tolerate committing this under some other name,
and we're also unwilling to remove postgresql_fdw_validator, then
we're essentially asking that we wait 4 or 5 years (or however long it
will take to deprecate postgresql_fdw_validator) to commit this very
important functionality to the server on the basis of the fact that
we've got a trivial name collision.  That seems excessive in the
extreme.  I'm frankly sorta shocked how much delay this issue has
*already* caused.  I suspect there are other issues with regard this
patch that are much more worthy of our attention.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: assertion failure w/extended query protocol
Next
From: Tom Lane
Date:
Subject: Re: assertion failure w/extended query protocol