pgsql: Get rid of scribbling on a const variable in psql's print.c.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Get rid of scribbling on a const variable in psql's print.c.
Date: 2016-03-12 23:17:05
Message-ID: E1aesmP-0007od-Lq@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Get rid of scribbling on a const variable in psql's print.c.

Commit a2dabf0e1dda93c8 had the bright idea that it could modify a "const"
global variable if it merely casted away const from a pointer. This does
not work on platforms where the compiler puts "const" variables into
read-only storage. Depressingly, we evidently have no such platforms in
our buildfarm ... an oversight I have now remedied. (The one platform
that is known to catch this is recent OS X with -fno-common.)

Per report from Chris Ruprecht. Back-patch to 9.5 where the bogus
code was introduced.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/1598dc15bab35a9fd061babbae716777259d3147

Modified Files
--------------
src/bin/psql/print.c | 4 ++--
src/bin/psql/print.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Joel Jacobson 2016-03-13 02:27:20 Re: [COMMITTERS] pgsql: Provide much better wait information in pg_stat_activity.
Previous Message Andres Freund 2016-03-12 21:14:09 Re: pgsql: Widen query numbers-of-tuples-processed counters to uint64.