Use E'' strings internally only when standard_conforming_strings =
Bruce Momjian <bruce@momjian.us>
Use E'' strings internally only when standard_conforming_strings = 'off'. This allows pg_dump output with standard_conforming_strings = 'on' to generate proper strings that can be loaded into other databases without the backslash doubling we typically do. I have added the dumping of the standard_conforming_strings value to pg_dump. I also added standard backslash handling for plpgsql.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/quote.c | modified | +10 −8 |
| src/backend/utils/adt/ruleutils.c | modified | +9 −6 |
| src/bin/initdb/initdb.c | modified | +4 −3 |
| src/bin/pg_dump/dumputils.c | modified | +11 −6 |
| src/bin/pg_dump/dumputils.h | modified | +2 −3 |
| src/bin/pg_dump/pg_backup_archiver.c | modified | +8 −7 |
| src/bin/pg_dump/pg_dumpall.c | modified | +10 −10 |
| src/bin/pg_dump/pg_dump.c | modified | +88 −28 |
| src/bin/psql/describe.c | modified | +2 −2 |
| src/bin/psql/large_obj.c | modified | +3 −2 |
| src/bin/scripts/createdb.c | modified | +2 −2 |
| src/bin/scripts/createuser.c | modified | +3 −3 |
| src/include/c.h | modified | +9 −2 |
| src/interfaces/ecpg/ecpglib/execute.c | modified | +9 −4 |
| src/pl/plpgsql/src/gram.y | modified | +4 −3 |