Skip site navigation (1) Skip section navigation (2)

psql - list objects in a schema

From: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: psql - list objects in a schema
Date: 2004-06-30 18:09:32
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
There is no command in psql to list the objects in a schema. The methods 
I've had so far is

  \d the_schema.*

that shows all objects in detail, not a list. And this is what I've been 

  \d the_schema.<tab><tab>

which shows a list of the names (if you have compiled psql with readline 
and tab completion works).

So I decided to add a command to list the objects. When I looked in the 
source I noticed that it already exists:

  \dtvs the_schema.*

I bet most of you didn't know that!

This is like running \dt, \dv and \ds. This lists the tables, views and
sequences, which is mostly what we want (I want to see functions as well,
but you cant get everything).

/Dennis Björklund

pgsql-general by date

Next:From: Alvaro HerreraDate: 2004-06-30 19:01:31
Subject: Re: backups
Previous:From: Markus WollnyDate: 2004-06-30 18:05:17
Subject: Backward compatibility patch for numutils.c

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group