access to non public schema

Поиск
Список
Период
Сортировка
Искать

access to non public schema

От:
donghe@caltech.edu
Дата:
Hello,

when I use #\d, it only list tables of public schema, how can I see/access
non-public schema in a database?

Thanks

Dong

Re: access to non public schema

От:
"Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Дата:
 wrote:
 
> when I use #\d, it only list tables of public schema, how can I
> see/access non-public schema in a database?
 
Include the schema on your search_path or specify it on your \d
command.  For example:
 
cir=> \dt information_schema.*
                      List of relations
       Schema       |          Name           | Type  | Owner
--------------------+-------------------------+-------+-------
 information_schema | sql_features            | table | ccsa
 information_schema | sql_implementation_info | table | ccsa
 information_schema | sql_languages           | table | ccsa
 information_schema | sql_packages            | table | ccsa
 information_schema | sql_parts               | table | ccsa
 information_schema | sql_sizing              | table | ccsa
 information_schema | sql_sizing_profiles     | table | ccsa
(7 rows)
 
-Kevin

Re: access to non public schema

От:
donghe@caltech.edu
Дата:
Thank you!
one more question, how can I know if one database has several schema?

>  wrote:
>
>> when I use #\d, it only list tables of public schema, how can I
>> see/access non-public schema in a database?
>
> Include the schema on your search_path or specify it on your \d
> command.  For example:
>
> cir=> \dt information_schema.*
>                       List of relations
>        Schema       |          Name           | Type  | Owner
> --------------------+-------------------------+-------+-------
>  information_schema | sql_features            | table | ccsa
>  information_schema | sql_implementation_info | table | ccsa
>  information_schema | sql_languages           | table | ccsa
>  information_schema | sql_packages            | table | ccsa
>  information_schema | sql_parts               | table | ccsa
>  information_schema | sql_sizing              | table | ccsa
>  information_schema | sql_sizing_profiles     | table | ccsa
> (7 rows)
>
> -Kevin
>


Re: access to non public schema

От:
"Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Дата:
 wrote:
 
> how can I know if one database has several schema?
 
\dn
 
You can get a list of available commands and options with:
 
\?
 
-Kevin

Re: access to non public schema

От:
Scott Marlowe <scott.marlowe@gmail.com>
Дата:
On Wed, Jun 16, 2010 at 2:43 PM, Kevin Grittner
 wrote:
>  wrote:
>
>> how can I know if one database has several schema?
>
> \dn

And if you need to see the SQL running behind the scenes, start psql
with the -E switch

Re: access to non public schema

От:
Dimitri Fontaine <dfontaine@hi-media.com>
Дата:
Scott Marlowe  writes:
>> \dn
>
> And if you need to see the SQL running behind the scenes, start psql
> with the -E switch

Or use \set ECHO_HIDDEN, which is a toggle.
-- 
dim
FAQ