Joshua D. Drake wrote:
On Tue, 2009-01-06 at 18:08 -0500, Bruce Momjian wrote:
Bruce Momjian wrote:
I also found a bug that \do didn't work because the AND system table
check was being added to the LEFT JOIN and not to the WHERE clause
(trigger display was also a problem).
Let me also say that that \d* display is ready to fall over from its own
weight:

Informational
Modifiers: S = show system objects + = Additional detail
\l[+] list all databases
\d[S+] list tables, views, and sequences
\d[S+] NAME describe table, view, sequence, or index
\da[S] [PATTERN] list aggregate functions
\db[+] [PATTERN] list tablespaces
\dc[S] [PATTERN] list conversions
Hmmm, I wonder if it makes sense to make it four column instead of two
column.
You mean like this?

fprintf(output, _("Informational\n"));
fprintf(output, _(" Modifiers: S = show system objects + = Additional detail\n"));
fprintf(output, _(" \\l[+] list all databases\n"));
fprintf(output, _(" \\d[S+] list tables, views, and sequences\n"));
fprintf(output, _(" \\d[S+] NAME describe table, view, sequence, or index\n"));
fprintf(output, _(" \\da[S] [PATTERN] list aggregate functions\n"));
fprintf(output, _(" \\db[+] [PATTERN] list tablespaces\n"));
fprintf(output, _(" \\dc[S] [PATTERN] list conversions\n"));
fprintf(output, _(" \\dC [PATTERN] list casts\n"));
fprintf(output, _(" \\dd [PATTERN] show comment for object\n"));
fprintf(output, _(" \\dd[S] [PATTERN] list comments on objects\n"));
fprintf(output, _(" \\dD[S] [PATTERN] list domains\n"));
fprintf(output, _(" \\des[+] [PATTERN] list foreign servers\n"));
fprintf(output, _(" \\deu[+] [PATTERN] list user mappings\n"));
fprintf(output, _(" \\dew[+] [PATTERN] list foreign-data wrappers\n"));
fprintf(output, _(" \\df[S+] [PATTERN] list functions\n"));
fprintf(output, _(" \\dF[+] [PATTERN] list text search configurations\n"));
fprintf(output, _(" \\dFd[+] [PATTERN] list text search dictionaries\n"));
fprintf(output, _(" \\dFp[+] [PATTERN] list text search parsers\n"));
fprintf(output, _(" \\dFt[+] [PATTERN] list text search templates\n"));
fprintf(output, _(" \\dg [PATTERN] list roles (groups)\n"));
fprintf(output, _(" \\di[S+] [PATTERN] list indexes\n"));
fprintf(output, _(" \\dl list large objects, same as \\lo_list\n"));
fprintf(output, _(" \\dn[+] [PATTERN] list schemas\n"));
fprintf(output, _(" \\do[S] [PATTERN] list operators\n"));
fprintf(output, _(" \\dp [PATTERN] list table, view, and sequence access privileges\n"));
fprintf(output, _(" \\z [PATTERN] same as \\dp\n"));
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, _(" \\dv[S+] [PATTERN] list views\n"));
fprintf(output, "\n");

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Search Discussions

  • Bruce Momjian at Jan 7, 2009 at 12:06 am

    Bruce Momjian wrote:
    Joshua D. Drake wrote:
    On Tue, 2009-01-06 at 18:08 -0500, Bruce Momjian wrote:
    Bruce Momjian wrote:
    I also found a bug that \do didn't work because the AND system table
    check was being added to the LEFT JOIN and not to the WHERE clause
    (trigger display was also a problem).
    Let me also say that that \d* display is ready to fall over from its own
    weight:

    Informational
    Modifiers: S = show system objects + = Additional detail
    \l[+] list all databases
    \d[S+] list tables, views, and sequences
    \d[S+] NAME describe table, view, sequence, or index
    \da[S] [PATTERN] list aggregate functions
    \db[+] [PATTERN] list tablespaces
    \dc[S] [PATTERN] list conversions
    Hmmm, I wonder if it makes sense to make it four column instead of two
    column.
    OK, done (below). 'list' seems kind of redundant. Can we factor that
    out somehow?

    Informational
    Modifiers: S = show system objects + = Additional detail
    \l[+] list all databases
    \d[S+] list tables, views, and sequences
    \d[S+] NAME describe table, view, sequence, or index
    \da[S] [PATTERN] list aggregate functions
    \db[+] [PATTERN] list tablespaces
    \dc[S] [PATTERN] list conversions
    \dC [PATTERN] list casts
    \dd [PATTERN] show comment for object
    \dd[S] [PATTERN] list comments on objects
    \dD[S] [PATTERN] list domains
    \des[+] [PATTERN] list foreign servers
    \deu[+] [PATTERN] list user mappings
    \dew[+] [PATTERN] list foreign-data wrappers
    \df[S+] [PATTERN] list functions
    \dF[+] [PATTERN] list text search configurations
    \dFd[+] [PATTERN] list text search dictionaries
    \dFp[+] [PATTERN] list text search parsers
    \dFt[+] [PATTERN] list text search templates
    \dg [PATTERN] list roles (groups)
    \di[S+] [PATTERN] list indexes
    \dl list large objects, same as \lo_list
    \dn[+] [PATTERN] list schemas
    \do[S] [PATTERN] list operators
    \dp [PATTERN] list table, view, and sequence access privileges
    \z [PATTERN] same as \dp
    \ds[S+] [PATTERN] list sequences
    \dt[S+] [PATTERN] list tables
    \dT[S+] [PATTERN] list data types
    \du [PATTERN] list roles (users)
    \dv[S+] [PATTERN] list views


    --
    Bruce Momjian <bruce@momjian.us> http://momjian.us
    EnterpriseDB http://enterprisedb.com

    + If your life is a hard drive, Christ can be your backup. +
  • Joshua D. Drake at Jan 7, 2009 at 12:09 am

    On Tue, 2009-01-06 at 19:06 -0500, Bruce Momjian wrote:
    Bruce Momjian wrote:
    OK, done (below). 'list' seems kind of redundant. Can we factor that
    out somehow?

    Informational
    Modifiers: S = show system objects + = Additional detail
    \l[+] list all databases
    \d[S+] list tables, views, and sequences
    \d[S+] NAME describe table, view, sequence, or index
    \da[S] [PATTERN] list aggregate functions
    \db[+] [PATTERN] list tablespaces
    \dc[S] [PATTERN] list conversions
    \dC [PATTERN] list casts
    \dd [PATTERN] show comment for object
    Per offline comments my thoughts were something like:

    Informational: S = show system objects + = Additional detail
    Display:
    \l[+] all databases
    \d[S+] tables, views, and sequences
    \d[S+] NAME describe table, view, sequence, or index
    \da[S] [PATTERN] aggregate functions
    \db[+] [PATTERN] tablespaces
    \dc[S] [PATTERN] conversions
    \dC [PATTERN] casts
    \dd [PATTERN] show comment for object
    \dd[S] [PATTERN] comments on objects


    But I am not putting up any sandbags :)

    Joshua D. Drake


    >
    --
    PostgreSQL
    Consulting, Development, Support, Training
    503-667-4564 - http://www.commandprompt.com/
    The PostgreSQL Company, serving since 1997
  • Bruce Momjian at Jan 7, 2009 at 12:13 am

    Joshua D. Drake wrote:
    On Tue, 2009-01-06 at 19:06 -0500, Bruce Momjian wrote:
    Bruce Momjian wrote:
    OK, done (below). 'list' seems kind of redundant. Can we factor that
    out somehow?

    Informational
    Modifiers: S = show system objects + = Additional detail
    \l[+] list all databases
    \d[S+] list tables, views, and sequences
    \d[S+] NAME describe table, view, sequence, or index
    \da[S] [PATTERN] list aggregate functions
    \db[+] [PATTERN] list tablespaces
    \dc[S] [PATTERN] list conversions
    \dC [PATTERN] list casts
    \dd [PATTERN] show comment for object
    Per offline comments my thoughts were something like:

    Informational: S = show system objects + = Additional detail
    Display:
    I don't like the "Display:" here because it mimicks the heading above
    it.
    \l[+] all databases
    \d[S+] tables, views, and sequences
    \d[S+] NAME describe table, view, sequence, or index
    \da[S] [PATTERN] aggregate functions
    \db[+] [PATTERN] tablespaces
    \dc[S] [PATTERN] conversions
    \dC [PATTERN] casts
    \dd [PATTERN] show comment for object
    \dd[S] [PATTERN] comments on objects
    --
    Bruce Momjian <bruce@momjian.us> http://momjian.us
    EnterpriseDB http://enterprisedb.com

    + If your life is a hard drive, Christ can be your backup. +
  • Joshua D. Drake at Jan 7, 2009 at 12:19 am

    On Tue, 2009-01-06 at 19:13 -0500, Bruce Momjian wrote:
    Joshua D. Drake wrote:
    Per offline comments my thoughts were something like:

    Informational: S = show system objects + = Additional detail
    Display:
    I don't like the "Display:" here because it mimicks the heading above
    it.
    Fair enough. I would be fine without it.

    Joshua D. Drake


    --
    PostgreSQL
    Consulting, Development, Support, Training
    503-667-4564 - http://www.commandprompt.com/
    The PostgreSQL Company, serving since 1997
  • Alvaro Herrera at Jan 7, 2009 at 12:58 am

    Bruce Momjian wrote:

    Informational
    Modifiers: S = show system objects + = Additional detail
    \l[+] list all databases
    \d[S+] list tables, views, and sequences
    \d[S+] NAME describe table, view, sequence, or index
    \da[S] [PATTERN] list aggregate functions
    If we do this, is there a way to abstract the translation marker _()
    from the alignment whitespace?

    --
    Alvaro Herrera http://www.CommandPrompt.com/
    The PostgreSQL Company - Command Prompt, Inc.
  • Joshua D. Drake at Jan 7, 2009 at 1:14 am

    On Tue, 2009-01-06 at 21:58 -0300, Alvaro Herrera wrote:
    Bruce Momjian wrote:
    Informational
    Modifiers: S = show system objects + = Additional detail
    \l[+] list all databases
    \d[S+] list tables, views, and sequences
    \d[S+] NAME describe table, view, sequence, or index
    \da[S] [PATTERN] list aggregate functions
    If we do this, is there a way to abstract the translation marker _()
    from the alignment whitespace?
    O.k. I might just be stupid here but can we just seek until we hit a non
    space or \t?

    Joshua D. Drake

    --
    Alvaro Herrera http://www.CommandPrompt.com/
    The PostgreSQL Company - Command Prompt, Inc.
    --
    PostgreSQL
    Consulting, Development, Support, Training
    503-667-4564 - http://www.commandprompt.com/
    The PostgreSQL Company, serving since 1997
  • Bruce Momjian at Jan 7, 2009 at 1:26 am

    Alvaro Herrera wrote:
    Bruce Momjian wrote:
    Informational
    Modifiers: S = show system objects + = Additional detail
    \l[+] list all databases
    \d[S+] list tables, views, and sequences
    \d[S+] NAME describe table, view, sequence, or index
    \da[S] [PATTERN] list aggregate functions
    If we do this, is there a way to abstract the translation marker _()
    from the alignment whitespace?
    So they don't have to re-translate?

    --
    Bruce Momjian <bruce@momjian.us> http://momjian.us
    EnterpriseDB http://enterprisedb.com

    + If your life is a hard drive, Christ can be your backup. +
  • Alvaro Herrera at Jan 7, 2009 at 1:36 am

    Bruce Momjian wrote:
    Alvaro Herrera wrote:
    Bruce Momjian wrote:
    Informational
    Modifiers: S = show system objects + = Additional detail
    \l[+] list all databases
    \d[S+] list tables, views, and sequences
    \d[S+] NAME describe table, view, sequence, or index
    \da[S] [PATTERN] list aggregate functions
    If we do this, is there a way to abstract the translation marker _()
    from the alignment whitespace?
    So they don't have to re-translate?
    No, so that the translators don't have to worry about getting alignment
    right; and also so that they don't have to translate \\d[S+] etc which
    obviously doesn't need any translation.

    --
    Alvaro Herrera http://www.CommandPrompt.com/
    The PostgreSQL Company - Command Prompt, Inc.
  • Bruce Momjian at Jan 7, 2009 at 1:51 am

    Alvaro Herrera wrote:
    Bruce Momjian wrote:
    Alvaro Herrera wrote:
    Bruce Momjian wrote:
    Informational
    Modifiers: S = show system objects + = Additional detail
    \l[+] list all databases
    \d[S+] list tables, views, and sequences
    \d[S+] NAME describe table, view, sequence, or index
    \da[S] [PATTERN] list aggregate functions
    If we do this, is there a way to abstract the translation marker _()
    from the alignment whitespace?
    So they don't have to re-translate?
    No, so that the translators don't have to worry about getting alignment
    right; and also so that they don't have to translate \\d[S+] etc which
    obviously doesn't need any translation.
    I am thinking we can do:

    fprintf(output, " \\da[S] %.9s %s\n", _("[PATTERN]"),
    _("list aggregate"));

    What do you think?

    --
    Bruce Momjian <bruce@momjian.us> http://momjian.us
    EnterpriseDB http://enterprisedb.com

    + If your life is a hard drive, Christ can be your backup. +
  • Alvaro Herrera at Jan 7, 2009 at 2:13 am

    Bruce Momjian wrote:
    Alvaro Herrera wrote:
    No, so that the translators don't have to worry about getting alignment
    right; and also so that they don't have to translate \\d[S+] etc which
    obviously doesn't need any translation.
    I am thinking we can do:

    fprintf(output, " \\da[S] %.9s %s\n", _("[PATTERN]"),
    _("list aggregate"));

    What do you think?
    Right, something like that ... I'm wondering, though, if there are any
    translations where [PATTERN] ends up longer than 9 chars. At least none
    of the existing translations has that problem, so it seems we're good ...

    Hmm, what's the difference here:

    \dd [PATTERN] show comment for object
    \dd[S] [PATTERN] list comments on objects
    ?

    --
    Alvaro Herrera http://www.CommandPrompt.com/
    PostgreSQL Replication, Consulting, Custom Development, 24x7 support
  • Bruce Momjian at Jan 7, 2009 at 3:29 am

    Alvaro Herrera wrote:
    Bruce Momjian wrote:
    Alvaro Herrera wrote:
    No, so that the translators don't have to worry about getting alignment
    right; and also so that they don't have to translate \\d[S+] etc which
    obviously doesn't need any translation.
    I am thinking we can do:

    fprintf(output, " \\da[S] %.9s %s\n", _("[PATTERN]"),
    _("list aggregate"));

    What do you think?
    Right, something like that ... I'm wondering, though, if there are any
    translations where [PATTERN] ends up longer than 9 chars. At least none
    of the existing translations has that problem, so it seems we're good ...
    I probably should have suggested:

    fprintf(output, " \\da[S] %-12s %s\n", _("[PATTERN]"),
    _("list aggregate"));

    I am hesistant to use -12.12 because that might cut off a long word, or
    a bracket.

    The larger question is how does printf(3) handle width, as bytes or
    characters. My Ubuntu says:

    If the converted value has fewer characters than the
    field width, it will be padded with spaces on the left
    (or right, if the left-adjustment flag has been given).

    This talks about characters, but is it really multibyte characters?
    Alvaro says we have to use %ls, but he says that is wchar_t, which we
    don't use.
    Hmm, what's the difference here:

    \dd [PATTERN] show comment for object
    \dd[S] [PATTERN] list comments on objects
    I don't know what you're talking about --- LOOK THERE! (removes duplicate
    line while no one is looking)

    --
    Bruce Momjian <bruce@momjian.us> http://momjian.us
    EnterpriseDB http://enterprisedb.com

    + If your life is a hard drive, Christ can be your backup. +

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedJan 6, '09 at 11:22p
activeJan 7, '09 at 3:29a
posts12
users3
websitepostgresql.org...
irc#postgresql

People

Translate

site design / logo © 2021 Grokbase