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

small psql patch - show Schema name for \dt \dv \dS

From: Joe Conway <mail(at)joeconway(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: small psql patch - show Schema name for \dt \dv \dS
Date: 2002-07-18 22:00:21
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
I can't remember who said they were working on schema related psql
changes, but I kept finding myself wishing I could see what schema a
table or view exists in when I use \dt, \dv, etc. So, here is a patch
which does just that.

It sorts on "Schema" first, and "Name" second.

It also changes the test for system objects to key off the namespace 
name starting with 'pg_' instead of the object name.

Sample output:

test=# create schema testschema;
test=# create view testschema.ts_view as select 1;
test=# \dv
                  List of relations
         Name        |   Schema   | Type |  Owner
  __testpassbyval    | public     | view | postgres
  fooview            | public     | view | postgres
  master_pg_proc     | public     | view | postgres
  rmt_pg_proc        | public     | view | postgres
  vw_dblink_get_pkey | public     | view | postgres
  vw_dblink_replace  | public     | view | postgres
  ts_view            | testschema | view | postgres
(7 rows)

If there are no objections, please apply.



Attachment: psql-describe.2002.07.18.1.patch
Description: text/plain (3.0 KB)


pgsql-patches by date

Next:From: Peter EisentrautDate: 2002-07-18 23:00:05
Subject: Re: [PATCHES] utils C files
Previous:From: Tom LaneDate: 2002-07-18 20:40:18
Subject: Re: Between Node

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