psql \du

Started by Andreas Wenkover 16 years ago9 messagesgeneral
Jump to latest
#1Andreas Wenk
a.wenk@netzmeister-st-pauli.de

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

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Andreas Wenk (#1)
Re: psql \du

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.

#3Andreas Wenk
a.wenk@netzmeister-st-pauli.de
In reply to: Peter Eisentraut (#2)
Re: psql \du

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

#4Andreas Wenk
a.wenk@netzmeister-st-pauli.de
In reply to: Peter Eisentraut (#2)
Re: psql \du [PATCH] extended \du with [+] - was missing

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

#5Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Andreas Wenk (#4)
Re: psql \du [PATCH] extended \du with [+] - was missing

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.

#6Andreas Wenk
a.wenk@netzmeister-st-pauli.de
In reply to: Alvaro Herrera (#5)
Re: psql \du [PATCH] extended \du with [+] - was missing

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

#7Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alvaro Herrera (#5)
Re: psql \du [PATCH] extended \du with [+] - was missing

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

#8Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Tom Lane (#7)
Re: psql \du [PATCH] extended \du with [+] - was missing

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

#9Andreas Wenk
a.wenk@netzmeister-st-pauli.de
In reply to: Alvaro Herrera (#8)
Re: psql \du [PATCH] extended \du with [+] - was missing

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