Обсуждение: psql \du

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

psql \du

От
ANdreas Wenk
Дата:
Hi,

I recognized in psql using the internal help (\?) that the *+* sign is
missing for the shortcut \du:

# \du
               List of roles
   Role name   |  Attributes  | Member of
--------------+--------------+-----------

# \du+
                      List of roles
   Role name   |  Attributes  | Member of | Description
--------------+--------------+-----------+-------------

Where shall I place this info? Is this also a bug?

Cheers

Andy

Re: psql \du

От
Peter Eisentraut
Дата:
On Thursday 16 July 2009 02:12:05 ANdreas Wenk wrote:
> Hi,
>
> I recognized in psql using the internal help (\?) that the *+* sign is
> missing for the shortcut \du:
>
> # \du
>                List of roles
>    Role name   |  Attributes  | Member of
> --------------+--------------+-----------
>
> # \du+
>                       List of roles
>    Role name   |  Attributes  | Member of | Description
> --------------+--------------+-----------+-------------
>
> Where shall I place this info? Is this also a bug?

Looks like the help is missing this info.  If you could provide a patch that
also fixes up the translations, that would be most helpful.

Re: psql \du

От
Andreas Wenk
Дата:
Peter Eisentraut schrieb:
> On Thursday 16 July 2009 02:12:05 ANdreas Wenk wrote:
>> Hi,
>>
>> I recognized in psql using the internal help (\?) that the *+* sign is
>> missing for the shortcut \du:
>>
>> # \du
>>                List of roles
>>    Role name   |  Attributes  | Member of
>> --------------+--------------+-----------
>>
>> # \du+
>>                       List of roles
>>    Role name   |  Attributes  | Member of | Description
>> --------------+--------------+-----------+-------------
>>
>> Where shall I place this info? Is this also a bug?
>
> Looks like the help is missing this info.  If you could provide a patch that
> also fixes up the translations, that would be most helpful.

Moin,

will be the first time for me but sure, I will do it ;-)

Cheers

Andy


Re: psql \du [PATCH] extended \du with [+] - was missing

От
Andreas Wenk
Дата:
Peter Eisentraut schrieb:
> On Thursday 16 July 2009 02:12:05 ANdreas Wenk wrote:
>> Hi,
>>
>> I recognized in psql using the internal help (\?) that the *+* sign is
>> missing for the shortcut \du:
>>
>> # \du
>>                List of roles
>>    Role name   |  Attributes  | Member of
>> --------------+--------------+-----------
>>
>> # \du+
>>                       List of roles
>>    Role name   |  Attributes  | Member of | Description
>> --------------+--------------+-----------+-------------
>>
>> Where shall I place this info? Is this also a bug?
>
> Looks like the help is missing this info.  If you could provide a patch that
> also fixes up the translations, that would be most helpful.
>

Hi,

here is the patch for help.c . I think updating some translations is not neccessary
because there is no change. Am I right?

---
  src/bin/psql/help.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c
index 5f13b8a..8a541e6 100644
--- a/src/bin/psql/help.c
+++ b/src/bin/psql/help.c
@@ -219,7 +219,7 @@ slashUsage(unsigned short int pager)
         fprintf(output, _("  \\ds[S+] [PATTERN]      list sequences\n"));
         fprintf(output, _("  \\dt[S+] [PATTERN]      list tables\n"));
         fprintf(output, _("  \\dT[S+] [PATTERN]      list data types\n"));
-       fprintf(output, _("  \\du     [PATTERN]      list roles (users)\n"));
+       fprintf(output, _("  \\du[+]  [PATTERN]      list roles (users)\n"));
         fprintf(output, _("  \\dv[S+] [PATTERN]      list views\n"));
         fprintf(output, _("  \\l[+]                  list all databases\n"));
         fprintf(output, _("  \\z      [PATTERN]      same as \\dp\n"));
--
1.6.0.4

0001-extended-du-with-was-missing.patch (END)



Cheers

Andy



Re: psql \du [PATCH] extended \du with [+] - was missing

От
Alvaro Herrera
Дата:
Andreas Wenk wrote:

> here is the patch for help.c . I think updating some translations is not
> neccessary because there is no change. Am I right?

Not really.  For example the spanish translation file has this:

msgid "  \\du     [PATTERN]      list roles (users)\n"
msgstr "  \\du     [PATRÓN]  listar roles (usuarios)\n"

and it needs to read instead:

msgid "  \\du[+]  [PATTERN]      list roles (users)\n"
msgstr "  \\du[+]  [PATRÓN]  listar roles (usuarios)\n"


--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Re: psql \du [PATCH] extended \du with [+] - was missing

От
Andreas Wenk
Дата:
Alvaro Herrera wrote:
> Andreas Wenk wrote:
>
>> here is the patch for help.c . I think updating some translations is not
>> neccessary because there is no change. Am I right?
>
> Not really.  For example the spanish translation file has this:
>
> msgid "  \\du     [PATTERN]      list roles (users)\n"
> msgstr "  \\du     [PATRÓN]  listar roles (usuarios)\n"
>
> and it needs to read instead:
>
> msgid "  \\du[+]  [PATTERN]      list roles (users)\n"
> msgstr "  \\du[+]  [PATRÓN]  listar roles (usuarios)\n"
>
>

first I want to mention, that I moved this to hackers list. And actually
I realized that I have to make more changes. I have to change also the
documentation. And the same change has to be made with \dg ...

After your reply I understand now what Peter meant with changing the
translation files also. I didn't have a look to them and did not know,
that \du and \dg is also written there - my fault.

I will provide a patch tomorrow.

Thanks for everybody's patience with me - I am learning ... ;-)

Cheers

Andy


Re: psql \du [PATCH] extended \du with [+] - was missing

От
Tom Lane
Дата:
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Andreas Wenk wrote:
>> here is the patch for help.c . I think updating some translations is not
>> neccessary because there is no change. Am I right?

> Not really.  For example the spanish translation file has this:

> msgid "  \\du     [PATTERN]      list roles (users)\n"
> msgstr "  \\du     [PATR�N]  listar roles (usuarios)\n"

We've never before expected patch submitters to patch the .po files,
and in fact I would have thought it would be useless to do so.  The
masters are not in our CVS.  Why is Andreas being told to worry about
this?

            regards, tom lane

Re: psql \du [PATCH] extended \du with [+] - was missing

От
Alvaro Herrera
Дата:
Tom Lane wrote:

> We've never before expected patch submitters to patch the .po files,
> and in fact I would have thought it would be useless to do so.  The
> masters are not in our CVS.  Why is Andreas being told to worry about
> this?

I must admit I don't know :-)

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: psql \du [PATCH] extended \du with [+] - was missing

От
Andreas Wenk
Дата:
Alvaro Herrera wrote:
> Tom Lane wrote:
>
>> We've never before expected patch submitters to patch the .po files,
>> and in fact I would have thought it would be useless to do so.  The
>> masters are not in our CVS.  Why is Andreas being told to worry about
>> this?
>
> I must admit I don't know :-)
>
hm - I don't wanna make it more complicate as it is ... Peter wrote as
the first answer to this post to do so - so actually I could do it (I
had a short look to the po files two minutes ago -> /src/bin/psql/po/).
I leave the desicion up to ;-)

Cheers

Andy