Thread

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Improve header output from psql's \watch command.

  1. increase message string buffer size of watch command of psql

    Ioseph Kim <pgsql-kr@postgresql.kr> — 2016-06-12T14:55:32Z

    Hello.
    In po.ko (korean message) at psql 
    #: command.c:2971
    #, c-format
    msgid "Watch every %lds\t%s"
    msgstr "%ld초 간격으로 지켜보기\t%s"
    
    this message string is a cut string, because buffer size is small.
    At line 2946 in src/bin/psql/command.c 
    char            title[50];
    
    size of message string for korean is over 50 bytes.
    (at least 80 columns terminal for common)
    
    Increase size of this title, please.
    50 bytes is so small for multi language.
    
    And. I suggest that date string might be local language,
    or current_timestamp string.
    
    Regards, Ioseph.
    
    
    
    
  2. Re: increase message string buffer size of watch command of psql

    Robert Haas <robertmhaas@gmail.com> — 2016-06-13T01:20:48Z

    On Sun, Jun 12, 2016 at 10:55 AM, Ioseph Kim <pgsql-kr@postgresql.kr> wrote:
    > Hello.
    > In po.ko (korean message) at psql
    > #: command.c:2971
    > #, c-format
    > msgid "Watch every %lds\t%s"
    > msgstr "%ld초 간격으로 지켜보기\t%s"
    >
    > this message string is a cut string, because buffer size is small.
    > At line 2946 in src/bin/psql/command.c
    > char            title[50];
    >
    > size of message string for korean is over 50 bytes.
    > (at least 80 columns terminal for common)
    >
    > Increase size of this title, please.
    > 50 bytes is so small for multi language.
    >
    > And. I suggest that date string might be local language,
    > or current_timestamp string.
    
    This was already changed in commit dea2b5960.
    
    -- 
    Robert Haas
    EnterpriseDB: http://www.enterprisedb.com
    The Enterprise PostgreSQL Company
    
    
    
  3. Re: increase message string buffer size of watch command of psql

    Tom Lane <tgl@sss.pgh.pa.us> — 2016-06-13T01:52:55Z

    Robert Haas <robertmhaas@gmail.com> writes:
    > On Sun, Jun 12, 2016 at 10:55 AM, Ioseph Kim <pgsql-kr@postgresql.kr> wrote:
    >> Increase size of this title, please.
    >> 50 bytes is so small for multi language.
    >> 
    >> And. I suggest that date string might be local language,
    >> or current_timestamp string.
    
    > This was already changed in commit dea2b5960.
    
    Well, we did part of that, but it's still using asctime().  Should we
    change that to strftime(..."%c"...) to be less English-centric?
    (The result seems to be the same in C locale.  pg_controldata has done
    it that way for a long time, with few complaints.)  If we want to do so,
    now would be the time, since 9.6 already whacked around the format
    of \watch output.
    
    			regards, tom lane
    
    
    
  4. Re: increase message string buffer size of watch command of psql

    Tom Lane <tgl@sss.pgh.pa.us> — 2016-06-14T16:56:23Z

    I wrote:
    > Robert Haas <robertmhaas@gmail.com> writes:
    >> On Sun, Jun 12, 2016 at 10:55 AM, Ioseph Kim <pgsql-kr@postgresql.kr> wrote:
    >>> Increase size of this title, please.
    >>> 50 bytes is so small for multi language.
    >>> And. I suggest that date string might be local language,
    >>> or current_timestamp string.
    
    >> This was already changed in commit dea2b5960.
    
    > Well, we did part of that, but it's still using asctime().  Should we
    > change that to strftime(..."%c"...) to be less English-centric?
    > (The result seems to be the same in C locale.  pg_controldata has done
    > it that way for a long time, with few complaints.)  If we want to do so,
    > now would be the time, since 9.6 already whacked around the format
    > of \watch output.
    
    I take it from the vast silence that nobody particularly cares one way
    or the other.  On reflection I think that this would be a good change
    to make, so I'll go do so unless I hear complaints soon.
    
    			regards, tom lane
    
    
    
  5. Re: increase message string buffer size of watch command of psql

    Ioseph Kim <pgsql-kr@postgresql.kr> — 2016-06-15T00:37:23Z

    
    2016년 06월 15일 01:56에 Tom Lane 이(가) 쓴 글:
    > I take it from the vast silence that nobody particularly cares one way 
    > or the other. On reflection I think that this would be a good change 
    > to make, so I'll go do so unless I hear complaints soon. regards, tom 
    > lane 
    
    I propose to change from asctime() to sql current_timestamp value,
    then users will  change date format with set command DateStyle.
    
    Regards, Ioseph.
    
    
    
    
  6. Re: increase message string buffer size of watch command of psql

    Tom Lane <tgl@sss.pgh.pa.us> — 2016-06-15T02:56:56Z

    Ioseph Kim <pgsql-kr@postgresql.kr> writes:
    > 2016 06 15 01:56 Tom Lane ()  :
    >> I take it from the vast silence that nobody particularly cares one way 
    >> or the other. On reflection I think that this would be a good change 
    >> to make, so I'll go do so unless I hear complaints soon. regards, tom 
    >> lane 
    
    > I propose to change from asctime() to sql current_timestamp value,
    > then users will  change date format with set command DateStyle.
    
    That would require an additional SQL query each time through the loop,
    which seems like undue expense.  It's also not terribly friendly to the
    goal of localization, I should think, given the limited number of
    datestyle options and the fact that none of them actually change day or
    month names to non-English choices.  And it would imply changing the
    timestamps from psql's timezone to the backend's.  While that might have
    been a good way to do it in a green field, it's not the way \watch has
    worked in the past, and given the lack of complaints I'm disinclined
    to change that.
    
    			regards, tom lane
    
    
    
  7. Re: increase message string buffer size of watch command of psql

    Alvaro Herrera <alvherre@2ndquadrant.com> — 2016-06-15T20:38:03Z

    Tom Lane wrote:
    > I wrote:
    
    > > Well, we did part of that, but it's still using asctime().  Should we
    > > change that to strftime(..."%c"...) to be less English-centric?
    > > (The result seems to be the same in C locale.  pg_controldata has done
    > > it that way for a long time, with few complaints.)  If we want to do so,
    > > now would be the time, since 9.6 already whacked around the format
    > > of \watch output.
    > 
    > I take it from the vast silence that nobody particularly cares one way
    > or the other.  On reflection I think that this would be a good change
    > to make, so I'll go do so unless I hear complaints soon.
    
    +1 to strftime("%c").  If we wanted to provide additional flexibility we
    could have a \pset option to change the strftime format string to
    something other than %c, but I don't think there's enough demand to
    justify it.
    
    -- 
    Álvaro Herrera                http://www.2ndQuadrant.com/
    PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
    
    
    
  8. Re: increase message string buffer size of watch command of psql

    Tom Lane <tgl@sss.pgh.pa.us> — 2016-06-15T23:37:25Z

    Alvaro Herrera <alvherre@2ndquadrant.com> writes:
    > +1 to strftime("%c").  If we wanted to provide additional flexibility we
    > could have a \pset option to change the strftime format string to
    > something other than %c, but I don't think there's enough demand to
    > justify it.
    
    Agreed, that seems like something for later (or never).  Pushed that way.
    
    I also widened the buffer a bit in the back branches, to address the
    original complaint.
    
    			regards, tom lane
    
    
    
  9. Re: increase message string buffer size of watch command of psql

    Ioseph Kim <pgsql-kr@postgresql.kr> — 2016-06-16T00:40:52Z

    Thanks, I agree that strftime() is better then asctime().
    
    regards, Ioseph
    
    2016년 06월 16일 08:37에 Tom Lane 이(가) 쓴 글:
    > Alvaro Herrera <alvherre@2ndquadrant.com> writes:
    >> +1 to strftime("%c").  If we wanted to provide additional flexibility we
    >> could have a \pset option to change the strftime format string to
    >> something other than %c, but I don't think there's enough demand to
    >> justify it.
    > Agreed, that seems like something for later (or never).  Pushed that way.
    >
    > I also widened the buffer a bit in the back branches, to address the
    > original complaint.
    >
    > 			regards, tom lane