postgresql/src/bin/pg_dump
Jeff Davis 1852aea3f5 Don't convert to and from floats in pg_dump.
Commit 8f427187db improved performance by remembering relation stats
as native types rather than issuing a new query for each relation.

Using native types is fine for integers like relpages; but reltuples
is floating point. The commit controllled for that complexity by using
setlocale(LC_NUMERIC, "C"). After that, Alexander Lakhin found a
problem in pg_strtof(), fixed in 00d61a08c5.

While we aren't aware of any more problems with that approach, it
seems wise to just use a string the whole way for floating point
values, as Corey's original patch did, and get rid of the
setlocale(). Integers are still converted to native types to avoid
wasting memory.

Co-authored-by: Corey Huinker <corey.huinker@gmail.com>
Discussion: https://postgr.es/m/3049348.1740855411@sss.pgh.pa.us
Discussion: https://postgr.es/m/560cca3781740bd69881bb07e26eb8f65b09792c.camel%40j-davis.com
2025-03-08 11:25:36 -08:00
..
po Update copyright for 2025 2025-01-01 11:21:55 -05:00
t Use attnum to identify index columns in pg_restore_attribute_stats(). 2025-02-26 16:36:20 -05:00
.gitignore Clean up after pg_dump test runs. 2016-05-06 22:28:01 -04:00
common.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
compress_gzip.c Remove various unnecessary (char *) casts 2025-02-20 19:49:27 +01:00
compress_gzip.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
compress_io.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
compress_io.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
compress_lz4.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
compress_lz4.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
compress_none.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
compress_none.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
compress_zstd.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
compress_zstd.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
dumputils.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
dumputils.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
filter.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
filter.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
Makefile Update copyright for 2025 2025-01-01 11:21:55 -05:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
nls.mk Add missing source files to nls.mk 2024-06-13 10:17:36 +02:00
parallel.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
parallel.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
pg_backup.h pg_dump: prepare attribute stats query. 2025-02-25 19:52:11 -08:00
pg_backup_archiver.c Address stats export review comments. 2025-03-06 00:11:12 -08:00
pg_backup_archiver.h Transfer statistics during pg_upgrade. 2025-02-20 01:29:06 -08:00
pg_backup_custom.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
pg_backup_db.c Remove unused #include's from bin .c files 2024-11-06 11:11:52 +01:00
pg_backup_db.h Revert "pg_dump: Lock all relations, not just plain tables". 2020-11-06 15:48:04 -05:00
pg_backup_directory.c Transfer statistics during pg_upgrade. 2025-02-20 01:29:06 -08:00
pg_backup_null.c Rearrange pg_dump's handling of large objects for better efficiency. 2024-04-01 16:25:56 -04:00
pg_backup_tar.c Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
pg_backup_tar.h Fix tar files emitted by pg_dump and pg_basebackup to be POSIX conformant. 2012-09-28 15:19:15 -04:00
pg_backup_utils.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
pg_backup_utils.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
pg_dump.c Don't convert to and from floats in pg_dump. 2025-03-08 11:25:36 -08:00
pg_dump.h Don't convert to and from floats in pg_dump. 2025-03-08 11:25:36 -08:00
pg_dump_sort.c Transfer statistics during pg_upgrade. 2025-02-20 01:29:06 -08:00
pg_dumpall.c Fix pg_dumpall to cope with dangling OIDs in pg_auth_members. 2025-02-21 13:37:15 -05:00
pg_restore.c Transfer statistics during pg_upgrade. 2025-02-20 01:29:06 -08:00