Skip to content

Commit 8de7cfd

Browse files
funbringervbwagner
authored andcommitted
<screen>s for to_atttype & anyarray_elemtype
1 parent 8d93c49 commit 8de7cfd

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

doc/src/sgml/dump_stat.sgml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ test=# \COPY (select dump_statistic()) TO 'dump_stat.sql'
9292
system catalog. It produces an <literal>INSERT</> statement
9393
per each tuple of the
9494
<link linkend="catalog-pg-statistic"><structname>pg_statistic</structname></link>,
95-
excluding the ones that do not relate to the tables in
95+
excluding the ones that do not relate to the tables in the
9696
<literal>schema_name</> schema.
9797
</para>
9898
</listitem>
@@ -141,8 +141,15 @@ test=# \COPY (select dump_statistic()) TO 'dump_stat.sql'
141141

142142
<listitem>
143143
<para>
144-
Fetches the schema-qualified type name by type id <literal>typid</>.
144+
Fetches the schema-qualified type name by type id <literal>typid</>. For example:
145145
</para>
146+
<screen>
147+
test=# SELECT to_schema_qualified_operator('+(int,int)'::regoperator);
148+
to_schema_qualified_operator
149+
------------------------------------------------
150+
pg_catalog.+(pg_catalog.int4, pg_catalog.int4)
151+
(1 row)
152+
</screen>
146153
</listitem>
147154
</varlistentry>
148155

@@ -171,8 +178,16 @@ test=# \COPY (select dump_statistic()) TO 'dump_stat.sql'
171178

172179
<listitem>
173180
<para>
174-
Returns the element type of the given array as <literal>oid</>.
181+
Returns the element type of the given array as <literal>oid</>. For example:
175182
</para>
183+
<screen>
184+
test=# SELECT anyarray_elemtype(array_in('{1,2,3}', 'int'::regtype, -1));
185+
anyarray_elemtype
186+
-------------------
187+
23
188+
(1 row)
189+
</screen>
190+
176191
</listitem>
177192
</varlistentry>
178193

@@ -219,7 +234,7 @@ test=# \COPY (select dump_statistic()) TO 'dump_stat.sql'
219234
<listitem>
220235
<para>
221236
Given a relation name <literal>relation</> and a column name
222-
<literal>col</>, returns the column type as <literal>text</>.
237+
<literal>col</>, returns the schema-qualified column type as <literal>text</>.
223238
</para>
224239
</listitem>
225240
</varlistentry>

0 commit comments

Comments
 (0)