summaryrefslogtreecommitdiff
path: root/src/bin/psql/print.h
diff options
context:
space:
mode:
authorTom Lane2016-03-12 23:16:24 +0000
committerTom Lane2016-03-12 23:16:24 +0000
commitfc7a9dfddb073a55a226778acd6a9b3f5ea2e626 (patch)
tree18de20b3041bf40bc7730dff7b7125f8ecc431fd /src/bin/psql/print.h
parent23a27b039d94ba359286694831eafe03cd970eef (diff)
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.
Diffstat (limited to 'src/bin/psql/print.h')
-rw-r--r--src/bin/psql/print.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/psql/print.h b/src/bin/psql/print.h
index 005ba15e983..9033c4bce38 100644
--- a/src/bin/psql/print.h
+++ b/src/bin/psql/print.h
@@ -163,7 +163,7 @@ typedef struct printQueryOpt
extern const printTextFormat pg_asciiformat;
extern const printTextFormat pg_asciiformat_old;
-extern const printTextFormat pg_utf8format;
+extern printTextFormat pg_utf8format; /* ideally would be const, but... */
extern void disable_sigpipe_trap(void);