diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2020-08-02 17:00:26 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2020-08-02 17:00:26 -0400 |
commit | 533020d05045046a3481fdd92777de7bb2e30ab3 (patch) | |
tree | 455211039753e8f9b516540591119c11fcf45f78 /doc/src | |
parent | 6ee3b5fb990ea11992b0db960d79b1fbe7b5e8e5 (diff) | |
download | postgresql-533020d05045046a3481fdd92777de7bb2e30ab3.tar.gz postgresql-533020d05045046a3481fdd92777de7bb2e30ab3.zip |
Fix minor issues in psql's new \dAc and related commands.
The type-name pattern in \dAc and \dAf was matched only to the actual
pg_type.typname string, which is fairly user-unfriendly in cases where
that is not what's shown to the user by format_type (compare "_int4"
and "integer[]"). Make this code match what \dT does, i.e. match the
pattern against either typname or format_type() output. Also fix its
broken handling of schema-name restrictions. (IOW, make these
processSQLNamePattern calls match \dT's.) While here, adjust
whitespace to make the query a little prettier in -E output, too.
Also improve some inaccuracies and shaky grammar in the related
documentation.
Noted while working on a patch for intarray's opclasses; I wondered
why I couldn't get a match to "integer*" for the input type name.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/indices.sgml | 9 | ||||
-rw-r--r-- | doc/src/sgml/ref/psql-ref.sgml | 38 |
2 files changed, 29 insertions, 18 deletions
diff --git a/doc/src/sgml/indices.sgml b/doc/src/sgml/indices.sgml index 28adaba72d0..671299ff059 100644 --- a/doc/src/sgml/indices.sgml +++ b/doc/src/sgml/indices.sgml @@ -1410,6 +1410,15 @@ SELECT am.amname AS index_method, ORDER BY index_method, opfamily_name, opfamily_operator; </programlisting> </para> + + <tip> + <para> + <xref linkend="app-psql"/> has + commands <command>\dAc</command>, <command>\dAf</command>, + and <command>\dAo</command>, which provide slightly more sophisticated + versions of these queries. + </para> + </tip> </sect1> diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 13179e845da..fc16e6c0c41 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -1245,13 +1245,13 @@ testdb=> <listitem> <para> Lists operator classes - (see <xref linkend="catalog-pg-opclass"/>). + (see <xref linkend="xindex-opclass"/>). If <replaceable class="parameter">access-method-pattern</replaceable> is specified, only operator classes associated with access methods whose - names match the pattern are listed. + names match that pattern are listed. If <replaceable class="parameter">input-type-pattern</replaceable> is specified, only operator classes associated with input types whose - names match the pattern are listed. + names match that pattern are listed. If <literal>+</literal> is appended to the command name, each operator class is listed with its associated operator family and owner. </para> @@ -1268,13 +1268,13 @@ testdb=> <listitem> <para> Lists operator families - (see <xref linkend="catalog-pg-opfamily"/>). + (see <xref linkend="xindex-opfamily"/>). If <replaceable class="parameter">access-method-pattern</replaceable> is specified, only operator families associated with access methods whose - names match the pattern are listed. + names match that pattern are listed. If <replaceable class="parameter">input-type-pattern</replaceable> is specified, only operator families associated with input types whose - names match the pattern are listed. + names match that pattern are listed. If <literal>+</literal> is appended to the command name, each operator family is listed with its owner. </para> @@ -1292,15 +1292,15 @@ testdb=> <listitem> <para> Lists operators associated with operator families - (<xref linkend="catalog-pg-amop"/>). + (see <xref linkend="xindex-strategies"/>). If <replaceable class="parameter">access-method-pattern</replaceable> is specified, only members of operator families associated with access - methods whose names match the pattern are listed. - If <replaceable class="parameter">input-type-pattern</replaceable> - is specified, only members of operator families whose names match the + methods whose names match that pattern are listed. + If <replaceable class="parameter">operator-family-pattern</replaceable> + is specified, only members of operator families whose names match that pattern are listed. If <literal>+</literal> is appended to the command name, each operator - is listed with its strategy number, purpose and sort operator family. + is listed with its sort operator family (if it is an ordering operator). </para> </listitem> </varlistentry> @@ -1314,14 +1314,16 @@ testdb=> </term> <listitem> <para> - Lists functions associated with operator families - (<xref linkend="catalog-pg-amproc"/>). + Lists support functions associated with operator families + (see <xref linkend="xindex-support"/>). If <replaceable class="parameter">access-method-pattern</replaceable> - is specified, only members of operator families associated with access - methods whose names match the pattern are listed. - If <replaceable class="parameter">input-type-pattern</replaceable> - is specified, only members of operator families whose names match the - pattern are listed. + is specified, only functions of operator families associated with + access methods whose names match that pattern are listed. + If <replaceable class="parameter">operator-family-pattern</replaceable> + is specified, only functions of operator families whose names match + that pattern are listed. + If <literal>+</literal> is appended to the command name, functions are + displayed verbosely, with their actual parameter lists. </para> </listitem> </varlistentry> |