public inbox for [email protected]
help / color / mirror / Atom feedFrom: Halley Pacheco de Oliveira <[email protected]>
To: [email protected]
Subject: current_schemas()
Date: Tue, 5 Jul 2005 08:14:40 -0300 (ART)
Message-ID: <[email protected]> (raw)
I would like to know how to use current_schemas(), since SELECT current_schemas(); didn't work in
PostgreSQL 7.4 and 8.0 psql.
Halley
PostgreSQL 8.0.3 Documentation
Chapter 16. Server Run-time Environment
16.4. Run-time Configuration
The current effective value of the search path can be examined via the SQL function
current_schemas(). This is not quite the same as examining the value of search_path, since
current_schemas() shows how the requests appearing in search_path were resolved.
teste=# \dn
********* QUERY **********
SELECT n.nspname AS "Name",
u.usename AS "Owner"
FROM pg_catalog.pg_namespace n LEFT JOIN pg_catalog.pg_user u
ON n.nspowner=u.usesysid
WHERE (n.nspname NOT LIKE 'pg\\_temp\\_%' OR
n.nspname = (pg_catalog.current_schemas(true))[1])
ORDER BY 1;
**************************
List of schemas
Name | Owner
--------------------+----------
information_schema | postgres
pg_catalog | postgres
pg_toast | postgres
public | postgres
(4 rows)
teste=# SELECT current_schema();
current_schema
----------------
public
(1 row)
teste=# SELECT current_schemas();
ERROR: function current_schemas() does not exist
HINT: No function matches the given name and argument types. You may need to add explicit type
casts.
_______________________________________________________
Yahoo! Acesso Grátis - Internet rápida e grátis.
Instale o discador agora! http://br.acesso.yahoo.com/
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: current_schemas()
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox