access to non public schema

Hello,

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

Thanks

Dong


--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
donghe [ Mi, 16 Juni 2010 19:56 ] [ ID #2043197 ]

Re: access to non public schema

<donghe [at] caltech.edu> 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

--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Kevin Grittner [ Mi, 16 Juni 2010 21:03 ] [ ID #2043198 ]

Re: access to non public schema

Thank you!
one more question, how can I know if one database has several schema?

> <donghe [at] caltech.edu> 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=3D> \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
>



--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
donghe [ Mi, 16 Juni 2010 22:41 ] [ ID #2043199 ]

Re: access to non public schema

<donghe [at] caltech.edu> wrote:

> how can I know if one database has several schema?

\dn

You can get a list of available commands and options with:

\?

-Kevin

--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Kevin Grittner [ Mi, 16 Juni 2010 22:43 ] [ ID #2043200 ]

Re: access to non public schema

On Wed, Jun 16, 2010 at 2:43 PM, Kevin Grittner
<Kevin.Grittner [at] wicourts.gov> wrote:
> <donghe [at] caltech.edu> 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

--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Scott Marlowe [ Mi, 16 Juni 2010 22:53 ] [ ID #2043201 ]

Re: access to non public schema

Scott Marlowe <scott.marlowe [at] gmail.com> 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

--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Dimitri Fontaine [ Do, 17 Juni 2010 09:45 ] [ ID #2043269 ]
Datenbanken » gmane.comp.db.postgresql.admin » access to non public schema

Vorheriges Thema: Ideas for a read only user access on partitioned tables.
Nächstes Thema: Server crash when using dblink_build_sql_* after alter table