From 343b7127b35444c20ce4b4791c7f87b8d5fc7053 Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Wed, 10 Feb 2016 20:53:50 -0600 Subject: [PATCH] Add List Available Schemas as a postgres til --- README.md | 3 ++- postgres/list-available-schemas.md | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 postgres/list-available-schemas.md diff --git a/README.md b/README.md index 1fc87aa..fa945d4 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ variety of languages and technologies. These are things that don't really warrant a full blog post. These are mostly things I learn by pairing with smart people at [Hashrocket](http://hashrocket.com/). -_328 TILs and counting..._ +_329 TILs and counting..._ --- @@ -163,6 +163,7 @@ _328 TILs and counting..._ - [Limit Execution Time Of Statements](postgres/limit-execution-time-of-statements.md) - [List All Columns Of A Specific Type](postgres/list-all-columns-of-a-specific-type.md) - [List All Versions Of A Function](postgres/list-all-versions-of-a-function.md) +- [List Available Schemas](postgres/list-available-schemas.md) - [List Database Users](postgres/list-database-users.md) - [Max Identifier Length Is 63 Bytes](postgres/max-identifier-length-is-63-bytes.md) - [pg Prefix Is Reserved For System Schemas](postgres/pg-prefix-is-reserved-for-system-schemas.md) diff --git a/postgres/list-available-schemas.md b/postgres/list-available-schemas.md new file mode 100644 index 0000000..7ab1efa --- /dev/null +++ b/postgres/list-available-schemas.md @@ -0,0 +1,10 @@ +# List Available Schemas + +Use the `\dn` command within a `psql` session to list the available schemas. +This will only included user created schemas. This means that schemas like +`public` will be listed whereas schemas `information_schema` and +`pg_catalog` will not. + +You can use `\dnS` to also list system schemas. + +[source](http://www.postgresql.org/docs/current/static/app-psql.html)