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

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: How to show the current schema or search path in the psql PROMP
Дата
Msg-id AANLkTik4iTJU3U6ybkMvDMmKEZWKeV_clItFGBZ0--r_@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to show the current schema or search path in the psql PROMP  (Adrian Klaver <adrian.klaver@gmail.com>)
Ответы Re: How to show the current schema or search path in the psql PROMP  (Adrian Klaver <adrian.klaver@gmail.com>)
Re: How to show the current schema or search path in the psql PROMP  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Fri, Jun 11, 2010 at 11:29 AM, Adrian Klaver <adrian.klaver@gmail.com> 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_path entry (the active schema) in the PROMPT
>>> variable for psql.
>>>
>>> Is there any way to do that? I couldn't find anything useful ...
>>
>> 5432 josh@josh# SHOW search_path;
>>   search_path
>> ----------------
>>  "$user",public
>> (1 row)
>>
>> --
>> Joshua Tolley / eggyknap
>> End Point Corporation
>> http://www.endpoint.com
>
> From here:
> http://www.postgresql.org/docs/8.4/interactive/functions-info.html
> current_schema[()]
>
> Maybe combined with
> %`command`
>
>    The output of command, similar to ordinary "back-tick" substitution.
>
> http://www.postgresql.org/docs/8.4/interactive/app-psql.html

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.

В списке pgsql-general по дате отправления:

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: How to show the current schema or search path in the psql PROMP
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: How to show the current schema or search path in the psql PROMP