improve line-breaking and indentation of foreign options dump

Started by Peter Eisentrautover 14 years ago1 messageshackers
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

Currently, pg_dump dumps foreign options in a single line, for example

CREATE SERVER cluster FOREIGN DATA WRAPPER plproxy OPTIONS (p0 'host=host0', p1 'host=host1', p2 'host=host2', p3 'host=host3');

I think it would be nicer if it looked more like this:

CREATE SERVER cluster FOREIGN DATA WRAPPER plproxy OPTIONS (
p0 'host=host0',
p1 'host=host1',
p2 'host=host2',
p3 'host=host3'
);

Attached is a patch to implement that, and a test file to play around
with.

Attachments:

pg-foreign-options-formatting.patchtext/x-patch; charset=UTF-8; name=pg-foreign-options-formatting.patchDownload+11-11
pg-foreign-options-formatting-test.sqltext/x-sql; charset=UTF-8; name=pg-foreign-options-formatting-test.sqlDownload