pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: David Gauthier <davegauthierpg@gmail.com>
To: pgsql-general@postgresql.org
Subject: Re: List tables for a specific schema
Date: Thu, 20 Jun 2019 14:50:08 -0700
Message-ID: <3a3909eb-616f-c6d4-5486-76abc219c253@aklaver.com> (raw)
In-Reply-To: <CAMBRECDLdvwuh7DaFwHeJqzCocpxugom8MKeBOKLy50RiRG--A@mail.gmail.com>
References: <CAMBRECDLdvwuh7DaFwHeJqzCocpxugom8MKeBOKLy50RiRG--A@mail.gmail.com>

On 6/20/19 2:43 PM, David Gauthier wrote:
> psql (9.6.7, server 9.5.2)
> 
> I created a schema in my DB called "dvm".  Then I created a table a-la...
> create table dvm.foo (col1 tedxt); .  I see the schema with \dnS+.  But 
> I can't see my table using \d.  I can see the dable with \d dvm.foo, so 
> it's in there.  The first column of the \d output is "Schema", so I 
> would have expected to see it there. But no luck.
> 
> What I would like is to see a list of all the tables in the dvm schema 
> and nothing else.  "\d dvm.*" works, but it also spills the details of 
> every table.  I just want the list of tables in the schema.
> 
> Is there a way to get what I want ?

Looks like a search_path issue.

In psql:

1) show search_path
To see what your search path is.

2) Then take a look at:
https://www.postgresql.org/docs/11/ddl-schemas.html#DDL-SCHEMAS-PATH

to see how to change it.

> 
> Thanks !


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (3+ messages)  latest in thread

Message-ID: <3a3909eb-616f-c6d4-5486-76abc219c253@aklaver.com>
Permalink:  ../3a3909eb-616f-c6d4-5486-76abc219c253@aklaver.com/
Also on:    postgresql.org/message-id/3a3909eb-616f-c6d4-5486-76abc219c253@aklaver.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, davegauthierpg@gmail.com
  Subject: Re: List tables for a specific schema
  In-Reply-To: <3a3909eb-616f-c6d4-5486-76abc219c253@aklaver.com>
  References: <CAMBRECDLdvwuh7DaFwHeJqzCocpxugom8MKeBOKLy50RiRG--A@mail.gmail.com> <3a3909eb-616f-c6d4-5486-76abc219c253@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox