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

From Bruce Momjian
Subject Re: Re: [COMMITTERS] pgsql: This makes all the \dX commands (most importantly to most: \df)
Date
Msg-id 200901070329.n073T8g01948@momjian.us
Whole thread Raw
In response to Re: Re: [COMMITTERS] pgsql: This makes all the \dX commands (most importantly to most: \df)  (Alvaro Herrera <alvherre@commandprompt.com>)
List 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@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: KaiGai Kohei
Date:
Subject: Re: New patch for Column-level privileges
Next
From: Kalyankumar Ramaseshan
Date:
Subject: Unicode support in postgresql code