Re: [GENERAL] How to show the current schema or search path in the psql PROMP

2010-06-14 Thread Alban Hertroys
On 14 Jun 2010, at 12:14, Schwaighofer Clemens wrote: > On Mon, Jun 14, 2010 at 19:10, Alban Hertroys > wrote: >> On 14 Jun 2010, at 2:02, Clemens Schwaighofer wrote: >> >>> Right now I added two simple wrappers in my .psqlrc >>> >>> \set shsh 'SHOW search_path;' >>> \set setsh 'SET search_path

Re: [GENERAL] How to show the current schema or search path in the psql PROMP

2010-06-14 Thread Schwaighofer Clemens
On Mon, Jun 14, 2010 at 19:10, Alban Hertroys wrote: > On 14 Jun 2010, at 2:02, Clemens Schwaighofer wrote: > >> Right now I added two simple wrappers in my .psqlrc >> >> \set shsh 'SHOW search_path;' >> \set setsh 'SET search_path TO' >> >> So I can at least set and check the schema more quickly.

Re: [GENERAL] How to show the current schema or search path in the psql PROMP

2010-06-14 Thread Alban Hertroys
On 14 Jun 2010, at 2:02, Clemens Schwaighofer wrote: > Right now I added two simple wrappers in my .psqlrc > > \set shsh 'SHOW search_path;' > \set setsh 'SET search_path TO' > > So I can at least set and check the schema more quickly. That only saves you a few key-presses though. Is your psql

Re: [GENERAL] How to show the current schema or search path in the psql PROMP

2010-06-13 Thread Clemens Schwaighofer
Right now I added two simple wrappers in my .psqlrc \set shsh 'SHOW search_path;' \set setsh 'SET search_path TO' So I can at least set and check the schema more quickly. But seeing it in the PROMPT would be th best. On Sat, Jun 12, 2010 at 05:26, Scott Marlowe wrote: > On Fri, Jun 11, 2010 at

Re: [GENERAL] How to show the current schema or search path in the psql PROMP

2010-06-11 Thread Scott Marlowe
On Fri, Jun 11, 2010 at 2:18 PM, Tom Lane wrote: > Scott Marlowe writes: >> But that runs a shell command, how's that supposed to get the >> search_path?  I've been trying to think up a solution to that and >> can't come up with one. > > Yeah, and you do *not* want the prompt mechanism trying to

Re: [GENERAL] How to show the current schema or search path in the psql PROMP

2010-06-11 Thread Tom Lane
Scott Marlowe writes: > But that runs a shell command, how's that supposed to get the > search_path? I've been trying to think up a solution to that and > can't come up with one. Yeah, and you do *not* want the prompt mechanism trying to send SQL commands... regards, tom

Re: [GENERAL] How to show the current schema or search path in the psql PROMP

2010-06-11 Thread Adrian Klaver
On 06/11/2010 11:10 AM, Scott Marlowe wrote: On Fri, Jun 11, 2010 at 11:29 AM, Adrian Klaver wrote: On 06/11/2010 10:23 AM, Joshua Tolley wrote: On Wed, Jun 09, 2010 at 05:52:49PM +0900, Schwaighofer Clemens wrote: Hi, I am trying to figure out how I can show the current search_path, or be

Re: [GENERAL] How to show the current schema or search path in the psql PROMP

2010-06-11 Thread Scott Marlowe
On Fri, Jun 11, 2010 at 11:29 AM, Adrian Klaver wrote: > On 06/11/2010 10:23 AM, Joshua Tolley wrote: >> >> On Wed, Jun 09, 2010 at 05:52:49PM +0900, Schwaighofer Clemens wrote: >>> >>> Hi, >>> >>> I am trying to figure out how I can show the current search_path, or >>> better the first search_pat

Re: [GENERAL] How to show the current schema or search path in the psql PROMP

2010-06-11 Thread Scott Marlowe
On Wed, Jun 9, 2010 at 2:52 AM, Schwaighofer Clemens wrote: > Hi, > > I am trying to figure out how I can show the current search_path, or > better the first search_path entry (the active schema) in the PROMPT > variable for psql. > > Is there any way to do that? I couldn't find anything useful ..

Re: [GENERAL] How to show the current schema or search path in the psql PROMP

2010-06-11 Thread Adrian Klaver
On 06/11/2010 10:23 AM, Joshua Tolley wrote: On Wed, Jun 09, 2010 at 05:52:49PM +0900, Schwaighofer Clemens wrote: Hi, I am trying to figure out how I can show the current search_path, or better the first search_path entry (the active schema) in the PROMPT variable for psql. Is there any way t

Re: [GENERAL] How to show the current schema or search path in the psql PROMP

2010-06-11 Thread Joshua Tolley
On Wed, Jun 09, 2010 at 05:52:49PM +0900, Schwaighofer Clemens wrote: > Hi, > > I am trying to figure out how I can show the current search_path, or > better the first search_path entry (the active schema) in the PROMPT > variable for psql. > > Is there any way to do that? I couldn't find anythin

[GENERAL] How to show the current schema or search path in the psql PROMP

2010-06-09 Thread Schwaighofer Clemens
Hi, I am trying to figure out how I can show the current search_path, or better the first search_path entry (the active schema) in the PROMPT variable for psql. Is there any way to do that? I couldn't find anything useful ... -- ★ Clemens 呉 Schwaighofer ★ IT Engineer/Web Producer/Planning ★ E-G