Commit 3f88b080 authored by Tom Lane's avatar Tom Lane

Fix some minor issues in view pretty-printing.

Code review for commit 2f582f76: 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.
parent c2b32180
...@@ -13858,7 +13858,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); ...@@ -13858,7 +13858,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
<row> <row>
<entry><literal><function>pg_get_viewdef(<parameter>view_name</parameter>, <parameter>pretty_bool</>)</function></literal></entry> <entry><literal><function>pg_get_viewdef(<parameter>view_name</parameter>, <parameter>pretty_bool</>)</function></literal></entry>
<entry><type>text</type></entry> <entry><type>text</type></entry>
<entry>get underlying <command>SELECT</command> command for view, <entry>get underlying <command>SELECT</command> command for view;
lines with fields are wrapped to 80 columns if <parameter>pretty_bool</parameter> is true (<emphasis>deprecated</emphasis>)</entry> lines with fields are wrapped to 80 columns if <parameter>pretty_bool</parameter> is true (<emphasis>deprecated</emphasis>)</entry>
</row> </row>
<row> <row>
...@@ -13869,14 +13869,15 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); ...@@ -13869,14 +13869,15 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
<row> <row>
<entry><literal><function>pg_get_viewdef(<parameter>view_oid</parameter>, <parameter>pretty_bool</>)</function></literal></entry> <entry><literal><function>pg_get_viewdef(<parameter>view_oid</parameter>, <parameter>pretty_bool</>)</function></literal></entry>
<entry><type>text</type></entry> <entry><type>text</type></entry>
<entry>get underlying <command>SELECT</command> command for view, <entry>get underlying <command>SELECT</command> command for view;
lines with fields are wrapped to 80 columns if <parameter>pretty_bool</parameter> is true</entry> lines with fields are wrapped to 80 columns if <parameter>pretty_bool</parameter> is true</entry>
</row> </row>
<row> <row>
<entry><literal><function>pg_get_viewdef(<parameter>view_oid</parameter>, <parameter>wrap_int</>)</function></literal></entry> <entry><literal><function>pg_get_viewdef(<parameter>view_oid</parameter>, <parameter>wrap_column_int</>)</function></literal></entry>
<entry><type>text</type></entry> <entry><type>text</type></entry>
<entry>get underlying <command>SELECT</command> command for view, <entry>get underlying <command>SELECT</command> command for view;
wrapping lines with fields as specified, pretty printing is implied</entry> lines with fields are wrapped to specified number of columns,
pretty printing is implied</entry>
</row> </row>
<row> <row>
<entry><literal><function>pg_options_to_table(<parameter>reloptions</parameter>)</function></literal></entry> <entry><literal><function>pg_options_to_table(<parameter>reloptions</parameter>)</function></literal></entry>
......
This diff is collapsed.
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