Skip to content

Commit 7ec225d

Browse files
committed
Fix some minor issues in view pretty-printing.
Code review for commit 2f582f7: don't use a static variable for what ought to be a deparse_context field, fix non-multibyte-safe test for spaces, avoid useless and potentially O(N^2) (though admittedly with a very small constant) calculations of wrap positions when we aren't going to wrap.
1 parent de4cf42 commit 7ec225d

File tree

2 files changed

+119
-107
lines changed

2 files changed

+119
-107
lines changed

doc/src/sgml/func.sgml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13820,7 +13820,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
1382013820
<row>
1382113821
<entry><literal><function>pg_get_viewdef(<parameter>view_name</parameter>, <parameter>pretty_bool</>)</function></literal></entry>
1382213822
<entry><type>text</type></entry>
13823-
<entry>get underlying <command>SELECT</command> command for view,
13823+
<entry>get underlying <command>SELECT</command> command for view;
1382413824
lines with fields are wrapped to 80 columns if <parameter>pretty_bool</parameter> is true (<emphasis>deprecated</emphasis>)</entry>
1382513825
</row>
1382613826
<row>
@@ -13831,14 +13831,15 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
1383113831
<row>
1383213832
<entry><literal><function>pg_get_viewdef(<parameter>view_oid</parameter>, <parameter>pretty_bool</>)</function></literal></entry>
1383313833
<entry><type>text</type></entry>
13834-
<entry>get underlying <command>SELECT</command> command for view,
13834+
<entry>get underlying <command>SELECT</command> command for view;
1383513835
lines with fields are wrapped to 80 columns if <parameter>pretty_bool</parameter> is true</entry>
1383613836
</row>
1383713837
<row>
13838-
<entry><literal><function>pg_get_viewdef(<parameter>view_oid</parameter>, <parameter>wrap_int</>)</function></literal></entry>
13838+
<entry><literal><function>pg_get_viewdef(<parameter>view_oid</parameter>, <parameter>wrap_column_int</>)</function></literal></entry>
1383913839
<entry><type>text</type></entry>
13840-
<entry>get underlying <command>SELECT</command> command for view,
13841-
wrapping lines with fields as specified, pretty printing is implied</entry>
13840+
<entry>get underlying <command>SELECT</command> command for view;
13841+
lines with fields are wrapped to specified number of columns,
13842+
pretty printing is implied</entry>
1384213843
</row>
1384313844
<row>
1384413845
<entry><literal><function>pg_options_to_table(<parameter>reloptions</parameter>)</function></literal></entry>

0 commit comments

Comments
 (0)