Обсуждение: psql verbose mode

Поиск
Список
Период
Сортировка

psql verbose mode

От
"Grzegorz Jaśkiewicz"
Дата:
hey folks,

browsing psql source,I came across one of the variations of \list / -l option, that could also print database size, which would be quite nice. But that only seem to work in 'verbose' mode. Now, how can I turn that mode on on command line, psql -lv doesn't do ;>


--
GJ

Re: psql verbose mode

От
Richard Huxton
Дата:
Grzegorz Jaśkiewicz wrote:
> hey folks,
>
> browsing psql source,I came across one of the variations of \list / -l
> option, that could also print database size, which would be quite nice. But
> that only seem to work in 'verbose' mode. Now, how can I turn that mode on
> on command line, psql -lv doesn't do ;>

Is \l+ what you mean?

--
  Richard Huxton
  Archonet Ltd

Re: psql verbose mode

От
"Grzegorz Jaśkiewicz"
Дата:
On Tue, Dec 2, 2008 at 11:40 AM, Richard Huxton <dev@archonet.com> wrote:

> Is \l+ what you mean?

same thing but from command line ?
not the shell

--
GJ

Re: psql verbose mode

От
"Grzegorz Jaśkiewicz"
Дата:
yup, looks like I'll have to implement it myself :P

Re: psql verbose mode

От
"Filip Rembiałkowski"
Дата:
2008/12/4 Grzegorz Jaśkiewicz <gryzman@gmail.com>
yup, looks like I'll have to implement it myself :P

After a bit of investigation I think it's not so easy.
-v switch is reserved in psql for "set  variable".
So the patch would have to inctroduce a new switch or use VERBOSITY environment variable, which actually means something different.

There is another way - much simpler I think:

psql -c '\l+'



--
Filip Rembiałkowski

Re: psql verbose mode

От
"Grzegorz Jaśkiewicz"
Дата:
On Thu, Dec 4, 2008 at 11:36 AM, Filip Rembiałkowski
<filip.rembialkowski@gmail.com> wrote:

> There is another way - much simpler I think:
>
> psql -c '\l+'

you're spoiling all the fun mate :P
I think there ought to be some sort of --verbose mode, otherwise they
wouldn't even bother implementing -l , with -c '\whatever' .
I'll scribble something for folks on -hackers, and see how would they
l(like|augh) the idea.

--
GJ

Re: psql verbose mode

От
"Filip Rembiałkowski"
Дата:


2008/12/2 Grzegorz Jaśkiewicz <gryzman@gmail.com>
On Tue, Dec 2, 2008 at 11:40 AM, Richard Huxton <dev@archonet.com> wrote:

> Is \l+ what you mean?

same thing but from command line ?
not the shell


it looks like a useful and easy to implement TODO item :)

 

--
GJ

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



--
Filip Rembiałkowski