-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> It's done that for some time. However, "nsp in current_schemas" isn't
> going to solve psql's problem anyway, since it ignores the fundamental
> issue of visibility: just because an object is in your search path does
> not mean you can see it. It might be masked by a similarly-named object
> earlier in the path.
I think that can be solved by doing an ORDER BY the current_schemas()
results and a LIMIT 1. The bigger problem is the above-mentioned 'nsp in
current_schemas'. I cannot think of an easy way to do this. In other
words, the equivalent of "select * from pg_class where relnamespace
in (current_schemas())" Is there a function in the core to check
an array? The *= construct in contrib/array would be nice, but it
cannot be used to compile psql. My other options are to create a
function, create some internal SQL calls, or do some really ugly
C parsing of the results of "select current_schemas(true)." I
am leaning towards the latter, but a nice internal function that
breaks an array into a table would be great.
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200207242119
-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html
iD8DBQE9P1LJvJuQZxSWSsgRAoG3AJ9Daapv2Hixx0JwE3s6Fn2v9sqU+QCghSpc
gPhA2xG2bRH1kXhgnLSm58Y=
=0s2B
-----END PGP SIGNATURE-----