On Sat, 2002-05-18 at 01:01, Tom Lane wrote: > "Dave Page" <[EMAIL PROTECTED]> writes: > > It doesn't work quite like that anyway. > > Oh, so essentially you want to simulate the namespace search on the > application side. I see. > > > Anyway, current_schemas() seems ideal, thanks. > > It may not be exactly what you need, because it doesn't tell you about > implicitly searched schemas --- which always includes pg_catalog and > will include a temp namespace if you've activated one. For instance, > if current_schemas claims the search path is > > regression=> select current_schemas(); > current_schemas > ----------------- > {tgl,public} > (1 row) > > then the real path is effectively {pg_catalog,tgl,public}, or possibly > {pg_temp_NNN,pg_catalog,tgl,public}. > > There was already some discussion about making a variant version of > current_schemas() that would tell you the Whole Truth, including the > implicitly searched schemas. Seems like we'd better do that; otherwise > we'll find people hardwiring knowledge of these implicit search rules > into their apps, which is probably a bad idea. > > Anyone have a preference about what to call it? I could see making a > version of current_schemas() that takes a boolean parameter, or we > could choose another function name for the implicit-schemas-too version.
or we could make another function with the same name :) current_schemas('full') -------------- Hannu ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org