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

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

From: Rod Taylor <rbt(at)zort(dot)ca>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: small psql patch - show Schema name for \dt \dv \dS
Date: 2002-07-25 01:24:08
Message-ID: 1027560260.55417.25.camel@jester (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Perhaps current_schemas would be easier to use if it was changed to
return one schema per row returned?   Need a little uglyness around it
until attributes are re-worked. 

On Wed, 2002-07-24 at 21:23, Greg Sabino Mullane wrote:
> Hash: SHA1
> > It's done that for some time.  However, "nsp in current_schemas" isn't
> > going to solve psql's problem anyway, since it ignores the fundamental
> > issue of visibility: just because an object is in your search path does
> > not mean you can see it.  It might be masked by a similarly-named object
> > earlier in the path.
> I think that can be solved by doing an ORDER BY the current_schemas() 
> results and a LIMIT 1. The bigger problem is the above-mentioned 'nsp in 
> current_schemas'. I cannot think of an easy way to do this. In other 
> words, the equivalent of "select * from pg_class where relnamespace 
> in (current_schemas())" Is there a function in the core to check 
> an array? The *= construct in contrib/array would be nice, but it 
> cannot be used to compile psql. My other options are to create a 
> function, create some internal SQL calls, or do some really ugly 
> C parsing of the results of "select current_schemas(true)." I 
> am leaning towards the latter, but a nice internal function that 
> breaks an array into a table would be great.
> Greg Sabino Mullane  greg(at)turnstep(dot)com
> PGP Key: 0x14964AC8 200207242119
> Comment:
> iD8DBQE9P1LJvJuQZxSWSsgRAoG3AJ9Daapv2Hixx0JwE3s6Fn2v9sqU+QCghSpc
> gPhA2xG2bRH1kXhgnLSm58Y=
> =0s2B
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?

In response to


pgsql-patches by date

Next:From: Christopher Kings-LynneDate: 2002-07-25 02:14:28
Subject: Re: Proposal: anonymous composite types for Table Functions (aka SRFs)
Previous:From: Greg Sabino MullaneDate: 2002-07-25 01:23:09
Subject: Re: small psql patch - show Schema name for \dt \dv \dS

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