Re: Re: [COMMITTERS] pgsql: This makes all the \dX commands (most importantly to most: \df)

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: jd(at)commandprompt(dot)com, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: This makes all the \dX commands (most importantly to most: \df)
Date: 2009-01-07 03:29:08
Message-ID: 200901070329.n073T8g01948@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2009-01-07 03:39:33 pgsql: Update MinGW so it handles fseeko() similar to Unix.
Previous Message Bruce Momjian 2009-01-07 03:05:27 pgsql: Removeduplicate \dd psql help mention.

Browse pgsql-hackers by date

  From Date Subject
Next Message Kalyankumar Ramaseshan 2009-01-07 03:31:27 Unicode support in postgresql code
Previous Message KaiGai Kohei 2009-01-07 02:43:24 Re: New patch for Column-level privileges