save-restore-pset-info-fix.diff

text/x-patch

Filename: save-restore-pset-info-fix.diff
Type: text/x-patch
Part: 0
Message: Re: Add \pset options for boolean value display

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/psql/command.c 6 0
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 493400f9090..01b8f11aadd 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -5680,6 +5680,10 @@ savePsetInfo(const printQueryOpt *popt)
 		save->topt.tableAttr = pg_strdup(popt->topt.tableAttr);
 	if (popt->nullPrint)
 		save->nullPrint = pg_strdup(popt->nullPrint);
+	if (popt->truePrint)
+		save->truePrint = pg_strdup(popt->truePrint);
+	if (popt->falsePrint)
+		save->falsePrint = pg_strdup(popt->falsePrint);
 	if (popt->title)
 		save->title = pg_strdup(popt->title);
 
@@ -5707,6 +5711,8 @@ restorePsetInfo(printQueryOpt *popt, printQueryOpt *save)
 	free(popt->topt.recordSep.separator);
 	free(popt->topt.tableAttr);
 	free(popt->nullPrint);
+	free(popt->truePrint);
+	free(popt->falsePrint);
 	free(popt->title);
 
 	/*