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

Re: Schemas: status report, call for developers

From: Ian Barwick <barwick(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Schemas: status report, call for developers
Date: 2002-05-01 01:46:37
Message-ID: 200205010346.37919.barwick@gmx.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-interfaces
> For commands
> that accept wildcard patterns, what should happen --- should "\z my*"
> find these tables, if they're not in my search path?  Is "\z f*.my*"
> sensible to support?  I dunno yet.

Technical question - this query:

    SELECT nspname AS schema,
           relname AS object
      FROM pg_class c
INNER JOIN pg_namespace n
        ON c.relnamespace=n.oid
     WHERE relkind in ('r', 'v', 'S') AND
           relname NOT LIKE 'pg$_%%' ESCAPE '$'

produces a result like this:

 schema | object 
--------+--------
 public | abc
 foo    | abc
 foo    | xyz
 bar    | xyz
(4 rows)

How can I restrict the query to the schemas in the 
current search path, i.e. the schema names returned
by SELECT current_schemas() ?


Ian Barwick


In response to

Responses

pgsql-hackers by date

Next:From: Christopher Kings-LynneDate: 2002-05-01 02:05:23
Subject: Re: [HACKERS] [INTERFACES] Schemas: status report, call for developers
Previous:From: Neil ConwayDate: 2002-05-01 00:11:10
Subject: the parsing of parameters

pgsql-interfaces by date

Next:From: Christopher Kings-LynneDate: 2002-05-01 02:05:23
Subject: Re: [HACKERS] [INTERFACES] Schemas: status report, call for developers
Previous:From: Tom LaneDate: 2002-04-30 21:16:33
Subject: Re: Schemas: status report, call for developers

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