Skip to content

Commit 3f88b08

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 c2b3218 commit 3f88b08

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
@@ -13858,7 +13858,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
1385813858
<row>
1385913859
<entry><literal><function>pg_get_viewdef(<parameter>view_name</parameter>, <parameter>pretty_bool</>)</function></literal></entry>
1386013860
<entry><type>text</type></entry>
13861-
<entry>get underlying <command>SELECT</command> command for view,
13861+
<entry>get underlying <command>SELECT</command> command for view;
1386213862
lines with fields are wrapped to 80 columns if <parameter>pretty_bool</parameter> is true (<emphasis>deprecated</emphasis>)</entry>
1386313863
</row>
1386413864
<row>
@@ -13869,14 +13869,15 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
1386913869
<row>
1387013870
<entry><literal><function>pg_get_viewdef(<parameter>view_oid</parameter>, <parameter>pretty_bool</>)</function></literal></entry>
1387113871
<entry><type>text</type></entry>
13872-
<entry>get underlying <command>SELECT</command> command for view,
13872+
<entry>get underlying <command>SELECT</command> command for view;
1387313873
lines with fields are wrapped to 80 columns if <parameter>pretty_bool</parameter> is true</entry>
1387413874
</row>
1387513875
<row>
13876-
<entry><literal><function>pg_get_viewdef(<parameter>view_oid</parameter>, <parameter>wrap_int</>)</function></literal></entry>
13876+
<entry><literal><function>pg_get_viewdef(<parameter>view_oid</parameter>, <parameter>wrap_column_int</>)</function></literal></entry>
1387713877
<entry><type>text</type></entry>
13878-
<entry>get underlying <command>SELECT</command> command for view,
13879-
wrapping lines with fields as specified, pretty printing is implied</entry>
13878+
<entry>get underlying <command>SELECT</command> command for view;
13879+
lines with fields are wrapped to specified number of columns,
13880+
pretty printing is implied</entry>
1388013881
</row>
1388113882
<row>
1388213883
<entry><literal><function>pg_options_to_table(<parameter>reloptions</parameter>)</function></literal></entry>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy