Commit b416c0bb authored by Tom Lane's avatar Tom Lane

Teach pg_dump to quote reloption values safely.

Commit c7e27bec fixed this on the backend side, but we neglected
the fact that several code paths in pg_dump were printing reloptions
values that had not gotten massaged by ruleutils.  Apply essentially the
same quoting logic in those places, too.
parent 7157fe80
This diff is collapsed.
...@@ -205,7 +205,7 @@ typedef struct _tableInfo ...@@ -205,7 +205,7 @@ typedef struct _tableInfo
char relreplident; /* replica identifier */ char relreplident; /* replica identifier */
char *reltablespace; /* relation tablespace */ char *reltablespace; /* relation tablespace */
char *reloptions; /* options specified by WITH (...) */ char *reloptions; /* options specified by WITH (...) */
char *checkoption; /* WITH CHECK OPTION */ char *checkoption; /* WITH CHECK OPTION, if any */
char *toast_reloptions; /* WITH options for the TOAST table */ char *toast_reloptions; /* WITH options for the TOAST table */
bool hasindex; /* does it have any indexes? */ bool hasindex; /* does it have any indexes? */
bool hasrules; /* does it have any rules? */ bool hasrules; /* does it have any rules? */
...@@ -282,7 +282,7 @@ typedef struct _indxInfo ...@@ -282,7 +282,7 @@ typedef struct _indxInfo
TableInfo *indextable; /* link to table the index is for */ TableInfo *indextable; /* link to table the index is for */
char *indexdef; char *indexdef;
char *tablespace; /* tablespace in which index is stored */ char *tablespace; /* tablespace in which index is stored */
char *options; /* options specified by WITH (...) */ char *indreloptions; /* options specified by WITH (...) */
int indnkeys; int indnkeys;
Oid *indkeys; Oid *indkeys;
bool indisclustered; bool indisclustered;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment