List tables only in one schema with \dt meta-command

Moderator: NorbertKrupa

Post Reply
harryrundles
Intermediate
Intermediate
Posts: 96
Joined: Thu Jul 19, 2012 12:33 am

List tables only in one schema with \dt meta-command

Post by harryrundles » Thu Jul 26, 2012 6:27 pm

Hi all,

Has anyone figured out how to list the tables from just one schema using the \dt meta-command? If I just type \dt I get a list of all tables but I just want to see those in the public schema.

I tried this:

Code: Select all

dbadmin=> \dt public
No matching relations found.
... and this:

Code: Select all

dbadmin=> Please show me just the tables in the public schema;
ERROR 4856:  Syntax error at or near "Please" at character 1
LINE 1: Please show me just the tables in the public schema;
Neither method worked obviously!

Thanks,
Harry
Thanks,
Harry

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: List tables only in one schema with \dt meta-command

Post by JimKnicely » Thu Jul 26, 2012 8:29 pm

Try:

Code: Select all

\dt public.*
The "Please show me just the tables in the public schema;" feature may be added in Vertica 7...
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

harryrundles
Intermediate
Intermediate
Posts: 96
Joined: Thu Jul 19, 2012 12:33 am

Re: List tables only in one schema with \dt meta-command

Post by harryrundles » Fri Jul 27, 2012 1:29 am

Thanks, Jim! Wow, why didn't I think of the wildcard?
Thanks,
Harry

Post Reply

Return to “vSQL”