pg-dump-setlocale.diff
text/x-patch
Filename: pg-dump-setlocale.diff
Type: text/x-patch
Part: 0
Message:
Re: Statistics Import and Export
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| src/bin/pg_dump/pg_dump.c | 3 | 0 |
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 955550b91d2..ed85d843d5f 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -521,6 +521,9 @@ main(int argc, char **argv)
{NULL, 0, NULL, 0}
};
+ /* ensure that locale does not affect floating point interpretation */
+ setlocale(LC_NUMERIC, "C");
+
pg_logging_init(argv[0]);
pg_logging_set_level(PG_LOG_WARNING);
set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_dump"));