Re: search_path vs extensions

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Stephen Frost <sfrost(at)snowman(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Subject: Re: search_path vs extensions
Date: 2009-05-29 17:53:27
Message-ID: 4A202117.9080900@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dimitri,

> We'd still need search_path in there, as Python's still using a path.
> With 'default' search_path you'd have to qualify your type as
> pg_extensions.postgis.submodule.special_type, with pg_extensions in
> search_path the following notation would find it too:
> postgis.submodule.special_type.
> And if you have pg_extensions.postgis.submodule in the search_path, then
> you can use special_type without having to (nest-) schema qualify it.

But *incompatible* with SQL truncation of qualified names. Remember
that you can refer to something by any portion of its qualified name,
such as:

pg_extensions.postgis.submodule.special_type
postgis.submodule.special_type
submodule.special_type
special_type

... are all valid. Which is fine until you think that we could have a:

pg_extensions.pg_tap.submodule.special_type

or even a:

schema submodule.special_type

which would confuse both the search path and the user. What this means
is that all schema names would have to be unique, whether they are
nested or not. Which makes subschema *within* an extension rather useless.

--
Josh Berkus
PostgreSQL Experts Inc.
www.pgexperts.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Konstantin Izmailov 2009-05-29 17:55:23 Re: information_schema.columns changes needed for OLEDB
Previous Message Tom Lane 2009-05-29 17:30:36 Re: explain analyze rows=%.0f