pgsql: Use strftime("%c") to format timestamps in psql's \watch command

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Use strftime("%c") to format timestamps in psql's \watch command
Date: 2016-06-15 23:31:30
Message-ID: E1bDKHS-0007J6-VK@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Use strftime("%c") to format timestamps in psql's \watch command.

This allows the timestamps to follow local conventions (in particular,
they respond to the LC_TIME environment setting). In C locale you get
the same results as before. It seems like a good idea to do this now not
later because we already changed the format of \watch headers for 9.6.

Also, increase the buffer sizes a tad to ensure there's enough space for
translated strings.

Discussion: <20160612145532(dot)GA22965(at)postgresql(dot)kr>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/9901d8ac2e7326f5a705341d304e7c7f0f95a1e5

Modified Files
--------------
src/bin/psql/command.c | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-06-15 23:36:26 pgsql: Widen buffer for headers in psql's \watch command.
Previous Message Andres Freund 2016-06-15 22:34:40 Re: [HACKERS] Re: pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <