diff options
| author | Robert Haas | 2022-04-20 15:02:35 +0000 |
|---|---|---|
| committer | Robert Haas | 2022-04-20 15:37:29 +0000 |
| commit | d2d35479796c3510e249d6fc72adbd5df918efbf (patch) | |
| tree | d072bdea0ad0b0a1d598eb75daf06be1dfec7ad9 /src/test | |
| parent | 836af9756b742f5a8ae77b4bef9d27311772a13c (diff) | |
Allow db.schema.table patterns, but complain about random garbage.
psql, pg_dump, and pg_amcheck share code to process object name
patterns like 'foo*.bar*' to match all tables with names starting in
'bar' that are in schemas starting with 'foo'. Before v14, any number
of extra name parts were silently ignored, so a command line '\d
foo.bar.baz.bletch.quux' was interpreted as '\d bletch.quux'. In v14,
as a result of commit 2c8726c4b0a496608919d1f78a5abc8c9b6e0868, we
instead treated this as a request for table quux in a schema named
'foo.bar.baz.bletch'. That caused problems for people like Justin
Pryzby who were accustomed to copying strings of the form
db.schema.table from messages generated by PostgreSQL itself and using
them as arguments to \d.
Accordingly, revise things so that if an object name pattern contains
more parts than we're expecting, we throw an error, unless there's
exactly one extra part and it matches the current database name.
That way, thisdb.myschema.mytable is accepted as meaning just
myschema.mytable, but otherdb.myschema.mytable is an error, and so
is some.random.garbage.myschema.mytable.
Mark Dilger, per report from Justin Pryzby and discussion among
various people.
Discussion: https://www.postgresql.org/message-id/20211013165426.GD27491%40telsasoft.com
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/psql.out | 804 | ||||
| -rw-r--r-- | src/test/regress/sql/psql.sql | 242 |
2 files changed, 1046 insertions, 0 deletions
diff --git a/src/test/regress/expected/psql.out b/src/test/regress/expected/psql.out index 8e11ebbcaa4..1c5b5d2763d 100644 --- a/src/test/regress/expected/psql.out +++ b/src/test/regress/expected/psql.out @@ -5549,3 +5549,807 @@ SELECT * FROM bla ORDER BY 1; # final ON_ERROR_ROLLBACK: off DROP TABLE bla; DROP FUNCTION psql_error; +-- check describing invalid multipart names +\dA regression.heap +improper qualified name (too many dotted names): regression.heap +\dA nonesuch.heap +improper qualified name (too many dotted names): nonesuch.heap +\dt host.regression.pg_catalog.pg_class +improper qualified name (too many dotted names): host.regression.pg_catalog.pg_class +\dt |.pg_catalog.pg_class +cross-database references are not implemented: |.pg_catalog.pg_class +\dt nonesuch.pg_catalog.pg_class +cross-database references are not implemented: nonesuch.pg_catalog.pg_class +\da host.regression.pg_catalog.sum +improper qualified name (too many dotted names): host.regression.pg_catalog.sum +\da +.pg_catalog.sum +cross-database references are not implemented: +.pg_catalog.sum +\da nonesuch.pg_catalog.sum +cross-database references are not implemented: nonesuch.pg_catalog.sum +\dAc nonesuch.brin +improper qualified name (too many dotted names): nonesuch.brin +\dAc regression.brin +improper qualified name (too many dotted names): regression.brin +\dAf nonesuch.brin +improper qualified name (too many dotted names): nonesuch.brin +\dAf regression.brin +improper qualified name (too many dotted names): regression.brin +\dAo nonesuch.brin +improper qualified name (too many dotted names): nonesuch.brin +\dAo regression.brin +improper qualified name (too many dotted names): regression.brin +\dAp nonesuch.brin +improper qualified name (too many dotted names): nonesuch.brin +\dAp regression.brin +improper qualified name (too many dotted names): regression.brin +\db nonesuch.pg_default +improper qualified name (too many dotted names): nonesuch.pg_default +\db regression.pg_default +improper qualified name (too many dotted names): regression.pg_default +\dc host.regression.public.conversion +improper qualified name (too many dotted names): host.regression.public.conversion +\dc (.public.conversion +cross-database references are not implemented: (.public.conversion +\dc nonesuch.public.conversion +cross-database references are not implemented: nonesuch.public.conversion +\dC host.regression.pg_catalog.int8 +improper qualified name (too many dotted names): host.regression.pg_catalog.int8 +\dC ).pg_catalog.int8 +cross-database references are not implemented: ).pg_catalog.int8 +\dC nonesuch.pg_catalog.int8 +cross-database references are not implemented: nonesuch.pg_catalog.int8 +\dd host.regression.pg_catalog.pg_class +improper qualified name (too many dotted names): host.regression.pg_catalog.pg_class +\dd [.pg_catalog.pg_class +cross-database references are not implemented: [.pg_catalog.pg_class +\dd nonesuch.pg_catalog.pg_class +cross-database references are not implemented: nonesuch.pg_catalog.pg_class +\dD host.regression.public.gtestdomain1 +improper qualified name (too many dotted names): host.regression.public.gtestdomain1 +\dD ].public.gtestdomain1 +cross-database references are not implemented: ].public.gtestdomain1 +\dD nonesuch.public.gtestdomain1 +cross-database references are not implemented: nonesuch.public.gtestdomain1 +\ddp host.regression.pg_catalog.pg_class +improper qualified name (too many dotted names): host.regression.pg_catalog.pg_class +\ddp {.pg_catalog.pg_class +cross-database references are not implemented: {.pg_catalog.pg_class +\ddp nonesuch.pg_catalog.pg_class +cross-database references are not implemented: nonesuch.pg_catalog.pg_class +\dE host.regression.public.ft +improper qualified name (too many dotted names): host.regression.public.ft +\dE }.public.ft +cross-database references are not implemented: }.public.ft +\dE nonesuch.public.ft +cross-database references are not implemented: nonesuch.public.ft +\di host.regression.public.tenk1_hundred +improper qualified name (too many dotted names): host.regression.public.tenk1_hundred +\di ..public.tenk1_hundred +improper qualified name (too many dotted names): ..public.tenk1_hundred +\di nonesuch.public.tenk1_hundred +cross-database references are not implemented: nonesuch.public.tenk1_hundred +\dm host.regression.public.mvtest_bb +improper qualified name (too many dotted names): host.regression.public.mvtest_bb +\dm ^.public.mvtest_bb +cross-database references are not implemented: ^.public.mvtest_bb +\dm nonesuch.public.mvtest_bb +cross-database references are not implemented: nonesuch.public.mvtest_bb +\ds host.regression.public.check_seq +improper qualified name (too many dotted names): host.regression.public.check_seq +\ds regression|mydb.public.check_seq +cross-database references are not implemented: regression|mydb.public.check_seq +\ds nonesuch.public.check_seq +cross-database references are not implemented: nonesuch.public.check_seq +\dt host.regression.public.b_star +improper qualified name (too many dotted names): host.regression.public.b_star +\dt regres+ion.public.b_star +cross-database references are not implemented: regres+ion.public.b_star +\dt nonesuch.public.b_star +cross-database references are not implemented: nonesuch.public.b_star +\dv host.regression.public.shoe +improper qualified name (too many dotted names): host.regression.public.shoe +\dv regress(ion).public.shoe +cross-database references are not implemented: regress(ion).public.shoe +\dv nonesuch.public.shoe +cross-database references are not implemented: nonesuch.public.shoe +\des nonesuch.server +improper qualified name (too many dotted names): nonesuch.server +\des regression.server +improper qualified name (too many dotted names): regression.server +\des nonesuch.server +improper qualified name (too many dotted names): nonesuch.server +\des regression.server +improper qualified name (too many dotted names): regression.server +\des nonesuch.username +improper qualified name (too many dotted names): nonesuch.username +\des regression.username +improper qualified name (too many dotted names): regression.username +\dew nonesuch.fdw +improper qualified name (too many dotted names): nonesuch.fdw +\dew regression.fdw +improper qualified name (too many dotted names): regression.fdw +\df host.regression.public.namelen +improper qualified name (too many dotted names): host.regression.public.namelen +\df regres[qrstuv]ion.public.namelen +cross-database references are not implemented: regres[qrstuv]ion.public.namelen +\df nonesuch.public.namelen +cross-database references are not implemented: nonesuch.public.namelen +\dF host.regression.pg_catalog.arabic +improper qualified name (too many dotted names): host.regression.pg_catalog.arabic +\dF regres{1,2}ion.pg_catalog.arabic +cross-database references are not implemented: regres{1,2}ion.pg_catalog.arabic +\dF nonesuch.pg_catalog.arabic +cross-database references are not implemented: nonesuch.pg_catalog.arabic +\dFd host.regression.pg_catalog.arabic_stem +improper qualified name (too many dotted names): host.regression.pg_catalog.arabic_stem +\dFd regres?ion.pg_catalog.arabic_stem +cross-database references are not implemented: regres?ion.pg_catalog.arabic_stem +\dFd nonesuch.pg_catalog.arabic_stem +cross-database references are not implemented: nonesuch.pg_catalog.arabic_stem +\dFp host.regression.pg_catalog.default +improper qualified name (too many dotted names): host.regression.pg_catalog.default +\dFp ^regression.pg_catalog.default +cross-database references are not implemented: ^regression.pg_catalog.default +\dFp nonesuch.pg_catalog.default +cross-database references are not implemented: nonesuch.pg_catalog.default +\dFt host.regression.pg_catalog.ispell +improper qualified name (too many dotted names): host.regression.pg_catalog.ispell +\dFt regression$.pg_catalog.ispell +cross-database references are not implemented: regression$.pg_catalog.ispell +\dFt nonesuch.pg_catalog.ispell +cross-database references are not implemented: nonesuch.pg_catalog.ispell +\dg nonesuch.pg_database_owner +improper qualified name (too many dotted names): nonesuch.pg_database_owner +\dg regression.pg_database_owner +improper qualified name (too many dotted names): regression.pg_database_owner +\dL host.regression.plpgsql +improper qualified name (too many dotted names): host.regression.plpgsql +\dL *.plpgsql +cross-database references are not implemented: *.plpgsql +\dL nonesuch.plpgsql +cross-database references are not implemented: nonesuch.plpgsql +\dn host.regression.public +improper qualified name (too many dotted names): host.regression.public +\dn """".public +cross-database references are not implemented: """".public +\dn nonesuch.public +cross-database references are not implemented: nonesuch.public +\do host.regression.public.!=- +improper qualified name (too many dotted names): host.regression.public.!=- +\do "regression|mydb".public.!=- +cross-database references are not implemented: "regression|mydb".public.!=- +\do nonesuch.public.!=- +cross-database references are not implemented: nonesuch.public.!=- +\dO host.regression.pg_catalog.POSIX +improper qualified name (too many dotted names): host.regression.pg_catalog.POSIX +\dO .pg_catalog.POSIX +cross-database references are not implemented: .pg_catalog.POSIX +\dO nonesuch.pg_catalog.POSIX +cross-database references are not implemented: nonesuch.pg_catalog.POSIX +\dp host.regression.public.a_star +improper qualified name (too many dotted names): host.regression.public.a_star +\dp "regres+ion".public.a_star +cross-database references are not implemented: "regres+ion".public.a_star +\dp nonesuch.public.a_star +cross-database references are not implemented: nonesuch.public.a_star +\dP host.regression.public.mlparted +improper qualified name (too many dotted names): host.regression.public.mlparted +\dP "regres(sion)".public.mlparted +cross-database references are not implemented: "regres(sion)".public.mlparted +\dP nonesuch.public.mlparted +cross-database references are not implemented: nonesuch.public.mlparted +\drds nonesuch.lc_messages +improper qualified name (too many dotted names): nonesuch.lc_messages +\drds regression.lc_messages +improper qualified name (too many dotted names): regression.lc_messages +\dRp public.mypub +improper qualified name (too many dotted names): public.mypub +\dRp regression.mypub +improper qualified name (too many dotted names): regression.mypub +\dRs public.mysub +improper qualified name (too many dotted names): public.mysub +\dRs regression.mysub +improper qualified name (too many dotted names): regression.mysub +\dT host.regression.public.widget +improper qualified name (too many dotted names): host.regression.public.widget +\dT "regression{1,2}".public.widget +cross-database references are not implemented: "regression{1,2}".public.widget +\dT nonesuch.public.widget +cross-database references are not implemented: nonesuch.public.widget +\dx regression.plpgsql +improper qualified name (too many dotted names): regression.plpgsql +\dx nonesuch.plpgsql +improper qualified name (too many dotted names): nonesuch.plpgsql +\dX host.regression.public.func_deps_stat +improper qualified name (too many dotted names): host.regression.public.func_deps_stat +\dX "^regression$".public.func_deps_stat +cross-database references are not implemented: "^regression$".public.func_deps_stat +\dX nonesuch.public.func_deps_stat +cross-database references are not implemented: nonesuch.public.func_deps_stat +\dy regression.myevt +improper qualified name (too many dotted names): regression.myevt +\dy nonesuch.myevt +improper qualified name (too many dotted names): nonesuch.myevt +-- check that dots within quoted name segments are not counted +\dA "no.such.access.method" +List of access methods + Name | Type +------+------ +(0 rows) + +\dt "no.such.table.relation" + List of relations + Schema | Name | Type | Owner +--------+------+------+------- +(0 rows) + +\da "no.such.aggregate.function" + List of aggregate functions + Schema | Name | Result data type | Argument data types | Description +--------+------+------------------+---------------------+------------- +(0 rows) + +\dAc "no.such.operator.class" + List of operator classes + AM | Input type | Storage type | Operator class | Default? +----+------------+--------------+----------------+---------- +(0 rows) + +\dAf "no.such.operator.family" + List of operator families + AM | Operator family | Applicable types +----+-----------------+------------------ +(0 rows) + +\dAo "no.such.operator.of.operator.family" + List of operators of operator families + AM | Operator family | Operator | Strategy | Purpose +----+-----------------+----------+----------+--------- +(0 rows) + +\dAp "no.such.operator.support.function.of.operator.family" + List of support functions of operator families + AM | Operator family | Registered left type | Registered right type | Number | Function +----+-----------------+----------------------+-----------------------+--------+---------- +(0 rows) + +\db "no.such.tablespace" + List of tablespaces + Name | Owner | Location +------+-------+---------- +(0 rows) + +\dc "no.such.conversion" + List of conversions + Schema | Name | Source | Destination | Default? +--------+------+--------+-------------+---------- +(0 rows) + +\dC "no.such.cast" + List of casts + Source type | Target type | Function | Implicit? +-------------+-------------+----------+----------- +(0 rows) + +\dd "no.such.object.description" + Object descriptions + Schema | Name | Object | Description +--------+------+--------+------------- +(0 rows) + +\dD "no.such.domain" + List of domains + Schema | Name | Type | Collation | Nullable | Default | Check +--------+------+------+-----------+----------+---------+------- +(0 rows) + +\ddp "no.such.default.access.privilege" + Default access privileges + Owner | Schema | Type | Access privileges +-------+--------+------+------------------- +(0 rows) + +\di "no.such.index.relation" + List of relations + Schema | Name | Type | Owner | Table +--------+------+------+-------+------- +(0 rows) + +\dm "no.such.materialized.view" + List of relations + Schema | Name | Type | Owner +--------+------+------+------- +(0 rows) + +\ds "no.such.relation" + List of relations + Schema | Name | Type | Owner +--------+------+------+------- +(0 rows) + +\dt "no.such.relation" + List of relations + Schema | Name | Type | Owner +--------+------+------+------- +(0 rows) + +\dv "no.such.relation" + List of relations + Schema | Name | Type | Owner +--------+------+------+------- +(0 rows) + +\des "no.such.foreign.server" + List of foreign servers + Name | Owner | Foreign-data wrapper +------+-------+---------------------- +(0 rows) + +\dew "no.such.foreign.data.wrapper" + List of foreign-data wrappers + Name | Owner | Handler | Validator +------+-------+---------+----------- +(0 rows) + +\df "no.such.function" + List of functions + Schema | Name | Result data type | Argument data types | Type +--------+------+------------------+---------------------+------ +(0 rows) + +\dF "no.such.text.search.configuration" +List of text search configurations + Schema | Name | Description +--------+------+------------- +(0 rows) + +\dFd "no.such.text.search.dictionary" +List of text search dictionaries + Schema | Name | Description +--------+------+------------- +(0 rows) + +\dFp "no.such.text.search.parser" + List of text search parsers + Schema | Name | Description +--------+------+------------- +(0 rows) + +\dFt "no.such.text.search.template" +List of text search templates + Schema | Name | Description +--------+------+------------- +(0 rows) + +\dg "no.such.role" + List of roles + Role name | Attributes | Member of +-----------+------------+----------- + +\dL "no.such.language" + List of languages + Name | Owner | Trusted | Description +------+-------+---------+------------- +(0 rows) + +\dn "no.such.schema" +List of schemas + Name | Owner +------+------- +(0 rows) + +\do "no.such.operator" + List of operators + Schema | Name | Left arg type | Right arg type | Result type | Description +--------+------+---------------+----------------+-------------+------------- +(0 rows) + +\dO "no.such.collation" + List of collations + Schema | Name | Collate | Ctype | ICU Locale | Provider | Deterministic? +--------+------+---------+-------+------------+----------+---------------- +(0 rows) + +\dp "no.such.access.privilege" + Access privileges + Schema | Name | Type | Access privileges | Column privileges | Policies +--------+------+------+-------------------+-------------------+---------- +(0 rows) + +\dP "no.such.partitioned.relation" + List of partitioned relations + Schema | Name | Owner | Type | Parent name | Table +--------+------+-------+------+-------------+------- +(0 rows) + +\drds "no.such.setting" + List of settings + Role | Database | Settings +------+----------+---------- +(0 rows) + +\dRp "no.such.publication" + List of publications + Name | Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root +------+-------+------------+---------+---------+---------+-----------+---------- +(0 rows) + +\dRs "no.such.subscription" + List of subscriptions + Name | Owner | Enabled | Publication +------+-------+---------+------------- +(0 rows) + +\dT "no.such.data.type" + List of data types + Schema | Name | Description +--------+------+------------- +(0 rows) + +\dx "no.such.installed.extension" + List of installed extensions + Name | Version | Schema | Description +------+---------+--------+------------- +(0 rows) + +\dX "no.such.extended.statistics" + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+------+------------+-----------+--------------+----- +(0 rows) + +\dy "no.such.event.trigger" + List of event triggers + Name | Event | Owner | Enabled | Function | Tags +------+-------+-------+---------+----------+------ +(0 rows) + +-- again, but with dotted schema qualifications. +\dA "no.such.schema"."no.such.access.method" +improper qualified name (too many dotted names): "no.such.schema"."no.such.access.method" +\dt "no.such.schema"."no.such.table.relation" + List of relations + Schema | Name | Type | Owner +--------+------+------+------- +(0 rows) + +\da "no.such.schema"."no.such.aggregate.function" + List of aggregate functions + Schema | Name | Result data type | Argument data types | Description +--------+------+------------------+---------------------+------------- +(0 rows) + +\dAc "no.such.schema"."no.such.operator.class" +improper qualified name (too many dotted names): "no.such.schema"."no.such.operator.class" +\dAf "no.such.schema"."no.such.operator.family" +improper qualified name (too many dotted names): "no.such.schema"."no.such.operator.family" +\dAo "no.such.schema"."no.such.operator.of.operator.family" +improper qualified name (too many dotted names): "no.such.schema"."no.such.operator.of.operator.family" +\dAp "no.such.schema"."no.such.operator.support.function.of.operator.family" +improper qualified name (too many dotted names): "no.such.schema"."no.such.operator.support.function.of.operator.family" +\db "no.such.schema"."no.such.tablespace" +improper qualified name (too many dotted names): "no.such.schema"."no.such.tablespace" +\dc "no.such.schema"."no.such.conversion" + List of conversions + Schema | Name | Source | Destination | Default? +--------+------+--------+-------------+---------- +(0 rows) + +\dC "no.such.schema"."no.such.cast" + List of casts + Source type | Target type | Function | Implicit? +-------------+-------------+----------+----------- +(0 rows) + +\dd "no.such.schema"."no.such.object.description" + Object descriptions + Schema | Name | Object | Description +--------+------+--------+------------- +(0 rows) + +\dD "no.such.schema"."no.such.domain" + List of domains + Schema | Name | Type | Collation | Nullable | Default | Check +--------+------+------+-----------+----------+---------+------- +(0 rows) + +\ddp "no.such.schema"."no.such.default.access.privilege" + Default access privileges + Owner | Schema | Type | Access privileges +-------+--------+------+------------------- +(0 rows) + +\di "no.such.schema"."no.such.index.relation" + List of relations + Schema | Name | Type | Owner | Table +--------+------+------+-------+------- +(0 rows) + +\dm "no.such.schema"."no.such.materialized.view" + List of relations + Schema | Name | Type | Owner +--------+------+------+------- +(0 rows) + +\ds "no.such.schema"."no.such.relation" + List of relations + Schema | Name | Type | Owner +--------+------+------+------- +(0 rows) + +\dt "no.such.schema"."no.such.relation" + List of relations + Schema | Name | Type | Owner +--------+------+------+------- +(0 rows) + +\dv "no.such.schema"."no.such.relation" + List of relations + Schema | Name | Type | Owner +--------+------+------+------- +(0 rows) + +\des "no.such.schema"."no.such.foreign.server" +improper qualified name (too many dotted names): "no.such.schema"."no.such.foreign.server" +\dew "no.such.schema"."no.such.foreign.data.wrapper" +improper qualified name (too many dotted names): "no.such.schema"."no.such.foreign.data.wrapper" +\df "no.such.schema"."no.such.function" + List of functions + Schema | Name | Result data type | Argument data types | Type +--------+------+------------------+---------------------+------ +(0 rows) + +\dF "no.such.schema"."no.such.text.search.configuration" +List of text search configurations + Schema | Name | Description +--------+------+------------- +(0 rows) + +\dFd "no.such.schema"."no.such.text.search.dictionary" +List of text search dictionaries + Schema | Name | Description +--------+------+------------- +(0 rows) + +\dFp "no.such.schema"."no.such.text.search.parser" + List of text search parsers + Schema | Name | Description +--------+------+------------- +(0 rows) + +\dFt "no.such.schema"."no.such.text.search.template" +List of text search templates + Schema | Name | Description +--------+------+------------- +(0 rows) + +\dg "no.such.schema"."no.such.role" +improper qualified name (too many dotted names): "no.such.schema"."no.such.role" +\dL "no.such.schema"."no.such.language" +cross-database references are not implemented: "no.such.schema"."no.such.language" +\do "no.such.schema"."no.such.operator" + List of operators + Schema | Name | Left arg type | Right arg type | Result type | Description +--------+------+---------------+----------------+-------------+------------- +(0 rows) + +\dO "no.such.schema"."no.such.collation" + List of collations + Schema | Name | Collate | Ctype | ICU Locale | Provider | Deterministic? +--------+------+---------+-------+------------+----------+---------------- +(0 rows) + +\dp "no.such.schema"."no.such.access.privilege" + Access privileges + Schema | Name | Type | Access privileges | Column privileges | Policies +--------+------+------+-------------------+-------------------+---------- +(0 rows) + +\dP "no.such.schema"."no.such.partitioned.relation" + List of partitioned relations + Schema | Name | Owner | Type | Parent name | Table +--------+------+-------+------+-------------+------- +(0 rows) + +\drds "no.such.schema"."no.such.setting" +improper qualified name (too many dotted names): "no.such.schema"."no.such.setting" +\dRp "no.such.schema"."no.such.publication" +improper qualified name (too many dotted names): "no.such.schema"."no.such.publication" +\dRs "no.such.schema"."no.such.subscription" +improper qualified name (too many dotted names): "no.such.schema"."no.such.subscription" +\dT "no.such.schema"."no.such.data.type" + List of data types + Schema | Name | Description +--------+------+------------- +(0 rows) + +\dx "no.such.schema"."no.such.installed.extension" +improper qualified name (too many dotted names): "no.such.schema"."no.such.installed.extension" +\dX "no.such.schema"."no.such.extended.statistics" + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+------+------------+-----------+--------------+----- +(0 rows) + +\dy "no.such.schema"."no.such.event.trigger" +improper qualified name (too many dotted names): "no.such.schema"."no.such.event.trigger" +-- again, but with current database and dotted schema qualifications. +\dt regression."no.such.schema"."no.such.table.relation" + List of relations + Schema | Name | Type | Owner +--------+------+------+------- +(0 rows) + +\da regression."no.such.schema"."no.such.aggregate.function" + List of aggregate functions + Schema | Name | Result data type | Argument data types | Description +--------+------+------------------+---------------------+------------- +(0 rows) + +\dc regression."no.such.schema"."no.such.conversion" + List of conversions + Schema | Name | Source | Destination | Default? +--------+------+--------+-------------+---------- +(0 rows) + +\dC regression."no.such.schema"."no.such.cast" + List of casts + Source type | Target type | Function | Implicit? +-------------+-------------+----------+----------- +(0 rows) + +\dd regression."no.such.schema"."no.such.object.description" + Object descriptions + Schema | Name | Object | Description +--------+------+--------+------------- +(0 rows) + +\dD regression."no.such.schema"."no.such.domain" + List of domains + Schema | Name | Type | Collation | Nullable | Default | Check +--------+------+------+-----------+----------+---------+------- +(0 rows) + +\di regression."no.such.schema"."no.such.index.relation" + List of relations + Schema | Name | Type | Owner | Table +--------+------+------+-------+------- +(0 rows) + +\dm regression."no.such.schema"."no.such.materialized.view" + List of relations + Schema | Name | Type | Owner +--------+------+------+------- +(0 rows) + +\ds regression."no.such.schema"."no.such.relation" + List of relations + Schema | Name | Type | Owner +--------+------+------+------- +(0 rows) + +\dt regression."no.such.schema"."no.such.relation" + List of relations + Schema | Name | Type | Owner +--------+------+------+------- +(0 rows) + +\dv regression."no.such.schema"."no.such.relation" + List of relations + Schema | Name | Type | Owner +--------+------+------+------- +(0 rows) + +\df regression."no.such.schema"."no.such.function" + List of functions + Schema | Name | Result data type | Argument data types | Type +--------+------+------------------+---------------------+------ +(0 rows) + +\dF regression."no.such.schema"."no.such.text.search.configuration" +List of text search configurations + Schema | Name | Description +--------+------+------------- +(0 rows) + +\dFd regression."no.such.schema"."no.such.text.search.dictionary" +List of text search dictionaries + Schema | Name | Description +--------+------+------------- +(0 rows) + +\dFp regression."no.such.schema"."no.such.text.search.parser" + List of text search parsers + Schema | Name | Description +--------+------+------------- +(0 rows) + +\dFt regression."no.such.schema"."no.such.text.search.template" +List of text search templates + Schema | Name | Description +--------+------+------------- +(0 rows) + +\do regression."no.such.schema"."no.such.operator" + List of operators + Schema | Name | Left arg type | Right arg type | Result type | Description +--------+------+---------------+----------------+-------------+------------- +(0 rows) + +\dO regression."no.such.schema"."no.such.collation" + List of collations + Schema | Name | Collate | Ctype | ICU Locale | Provider | Deterministic? +--------+------+---------+-------+------------+----------+---------------- +(0 rows) + +\dp regression."no.such.schema"."no.such.access.privilege" + Access privileges + Schema | Name | Type | Access privileges | Column privileges | Policies +--------+------+------+-------------------+-------------------+---------- +(0 rows) + +\dP regression."no.such.schema"."no.such.partitioned.relation" + List of partitioned relations + Schema | Name | Owner | Type | Parent name | Table +--------+------+-------+------+-------------+------- +(0 rows) + +\dT regression."no.such.schema"."no.such.data.type" + List of data types + Schema | Name | Description +--------+------+------------- +(0 rows) + +\dX regression."no.such.schema"."no.such.extended.statistics" + List of extended statistics + Schema | Name | Definition | Ndistinct | Dependencies | MCV +--------+------+------------+-----------+--------------+----- +(0 rows) + +-- again, but with dotted database and dotted schema qualifications. +\dt "no.such.database"."no.such.schema"."no.such.table.relation" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.table.relation" +\da "no.such.database"."no.such.schema"."no.such.aggregate.function" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.aggregate.function" +\dc "no.such.database"."no.such.schema"."no.such.conversion" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.conversion" +\dC "no.such.database"."no.such.schema"."no.such.cast" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.cast" +\dd "no.such.database"."no.such.schema"."no.such.object.description" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.object.description" +\dD "no.such.database"."no.such.schema"."no.such.domain" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.domain" +\ddp "no.such.database"."no.such.schema"."no.such.default.access.privilege" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.default.access.privilege" +\di "no.such.database"."no.such.schema"."no.such.index.relation" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.index.relation" +\dm "no.such.database"."no.such.schema"."no.such.materialized.view" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.materialized.view" +\ds "no.such.database"."no.such.schema"."no.such.relation" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.relation" +\dt "no.such.database"."no.such.schema"."no.such.relation" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.relation" +\dv "no.such.database"."no.such.schema"."no.such.relation" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.relation" +\df "no.such.database"."no.such.schema"."no.such.function" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.function" +\dF "no.such.database"."no.such.schema"."no.such.text.search.configuration" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.text.search.configuration" +\dFd "no.such.database"."no.such.schema"."no.such.text.search.dictionary" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.text.search.dictionary" +\dFp "no.such.database"."no.such.schema"."no.such.text.search.parser" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.text.search.parser" +\dFt "no.such.database"."no.such.schema"."no.such.text.search.template" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.text.search.template" +\do "no.such.database"."no.such.schema"."no.such.operator" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.operator" +\dO "no.such.database"."no.such.schema"."no.such.collation" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.collation" +\dp "no.such.database"."no.such.schema"."no.such.access.privilege" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.access.privilege" +\dP "no.such.database"."no.such.schema"."no.such.partitioned.relation" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.partitioned.relation" +\dT "no.such.database"."no.such.schema"."no.such.data.type" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.data.type" +\dX "no.such.database"."no.such.schema"."no.such.extended.statistics" +cross-database references are not implemented: "no.such.database"."no.such.schema"."no.such.extended.statistics" diff --git a/src/test/regress/sql/psql.sql b/src/test/regress/sql/psql.sql index bf372c37a56..6fc0ac6bd17 100644 --- a/src/test/regress/sql/psql.sql +++ b/src/test/regress/sql/psql.sql @@ -1463,3 +1463,245 @@ SELECT * FROM bla ORDER BY 1; \echo '# final ON_ERROR_ROLLBACK:' :ON_ERROR_ROLLBACK DROP TABLE bla; DROP FUNCTION psql_error; + +-- check describing invalid multipart names +\dA regression.heap +\dA nonesuch.heap +\dt host.regression.pg_catalog.pg_class +\dt |.pg_catalog.pg_class +\dt nonesuch.pg_catalog.pg_class +\da host.regression.pg_catalog.sum +\da +.pg_catalog.sum +\da nonesuch.pg_catalog.sum +\dAc nonesuch.brin +\dAc regression.brin +\dAf nonesuch.brin +\dAf regression.brin +\dAo nonesuch.brin +\dAo regression.brin +\dAp nonesuch.brin +\dAp regression.brin +\db nonesuch.pg_default +\db regression.pg_default +\dc host.regression.public.conversion +\dc (.public.conversion +\dc nonesuch.public.conversion +\dC host.regression.pg_catalog.int8 +\dC ).pg_catalog.int8 +\dC nonesuch.pg_catalog.int8 +\dd host.regression.pg_catalog.pg_class +\dd [.pg_catalog.pg_class +\dd nonesuch.pg_catalog.pg_class +\dD host.regression.public.gtestdomain1 +\dD ].public.gtestdomain1 +\dD nonesuch.public.gtestdomain1 +\ddp host.regression.pg_catalog.pg_class +\ddp {.pg_catalog.pg_class +\ddp nonesuch.pg_catalog.pg_class +\dE host.regression.public.ft +\dE }.public.ft +\dE nonesuch.public.ft +\di host.regression.public.tenk1_hundred +\di ..public.tenk1_hundred +\di nonesuch.public.tenk1_hundred +\dm host.regression.public.mvtest_bb +\dm ^.public.mvtest_bb +\dm nonesuch.public.mvtest_bb +\ds host.regression.public.check_seq +\ds regression|mydb.public.check_seq +\ds nonesuch.public.check_seq +\dt host.regression.public.b_star +\dt regres+ion.public.b_star +\dt nonesuch.public.b_star +\dv host.regression.public.shoe +\dv regress(ion).public.shoe +\dv nonesuch.public.shoe +\des nonesuch.server +\des regression.server +\des nonesuch.server +\des regression.server +\des nonesuch.username +\des regression.username +\dew nonesuch.fdw +\dew regression.fdw +\df host.regression.public.namelen +\df regres[qrstuv]ion.public.namelen +\df nonesuch.public.namelen +\dF host.regression.pg_catalog.arabic +\dF regres{1,2}ion.pg_catalog.arabic +\dF nonesuch.pg_catalog.arabic +\dFd host.regression.pg_catalog.arabic_stem +\dFd regres?ion.pg_catalog.arabic_stem +\dFd nonesuch.pg_catalog.arabic_stem +\dFp host.regression.pg_catalog.default +\dFp ^regression.pg_catalog.default +\dFp nonesuch.pg_catalog.default +\dFt host.regression.pg_catalog.ispell +\dFt regression$.pg_catalog.ispell +\dFt nonesuch.pg_catalog.ispell +\dg nonesuch.pg_database_owner +\dg regression.pg_database_owner +\dL host.regression.plpgsql +\dL *.plpgsql +\dL nonesuch.plpgsql +\dn host.regression.public +\dn """".public +\dn nonesuch.public +\do host.regression.public.!=- +\do "regression|mydb".public.!=- +\do nonesuch.public.!=- +\dO host.regression.pg_catalog.POSIX +\dO .pg_catalog.POSIX +\dO nonesuch.pg_catalog.POSIX +\dp host.regression.public.a_star +\dp "regres+ion".public.a_star +\dp nonesuch.public.a_star +\dP host.regression.public.mlparted +\dP "regres(sion)".public.mlparted +\dP nonesuch.public.mlparted +\drds nonesuch.lc_messages +\drds regression.lc_messages +\dRp public.mypub +\dRp regression.mypub +\dRs public.mysub +\dRs regression.mysub +\dT host.regression.public.widget +\dT "regression{1,2}".public.widget +\dT nonesuch.public.widget +\dx regression.plpgsql +\dx nonesuch.plpgsql +\dX host.regression.public.func_deps_stat +\dX "^regression$".public.func_deps_stat +\dX nonesuch.public.func_deps_stat +\dy regression.myevt +\dy nonesuch.myevt + +-- check that dots within quoted name segments are not counted +\dA "no.such.access.method" +\dt "no.such.table.relation" +\da "no.such.aggregate.function" +\dAc "no.such.operator.class" +\dAf "no.such.operator.family" +\dAo "no.such.operator.of.operator.family" +\dAp "no.such.operator.support.function.of.operator.family" +\db "no.such.tablespace" +\dc "no.such.conversion" +\dC "no.such.cast" +\dd "no.such.object.description" +\dD "no.such.domain" +\ddp "no.such.default.access.privilege" +\di "no.such.index.relation" +\dm "no.such.materialized.view" +\ds "no.such.relation" +\dt "no.such.relation" +\dv "no.such.relation" +\des "no.such.foreign.server" +\dew "no.such.foreign.data.wrapper" +\df "no.such.function" +\dF "no.such.text.search.configuration" +\dFd "no.such.text.search.dictionary" +\dFp "no.such.text.search.parser" +\dFt "no.such.text.search.template" +\dg "no.such.role" +\dL "no.such.language" +\dn "no.such.schema" +\do "no.such.operator" +\dO "no.such.collation" +\dp "no.such.access.privilege" +\dP "no.such.partitioned.relation" +\drds "no.such.setting" +\dRp "no.such.publication" +\dRs "no.such.subscription" +\dT "no.such.data.type" +\dx "no.such.installed.extension" +\dX "no.such.extended.statistics" +\dy "no.such.event.trigger" + +-- again, but with dotted schema qualifications. +\dA "no.such.schema"."no.such.access.method" +\dt "no.such.schema"."no.such.table.relation" +\da "no.such.schema"."no.such.aggregate.function" +\dAc "no.such.schema"."no.such.operator.class" +\dAf "no.such.schema"."no.such.operator.family" +\dAo "no.such.schema"."no.such.operator.of.operator.family" +\dAp "no.such.schema"."no.such.operator.support.function.of.operator.family" +\db "no.such.schema"."no.such.tablespace" +\dc "no.such.schema"."no.such.conversion" +\dC "no.such.schema"."no.such.cast" +\dd "no.such.schema"."no.such.object.description" +\dD "no.such.schema"."no.such.domain" +\ddp "no.such.schema"."no.such.default.access.privilege" +\di "no.such.schema"."no.such.index.relation" +\dm "no.such.schema"."no.such.materialized.view" +\ds "no.such.schema"."no.such.relation" +\dt "no.such.schema"."no.such.relation" +\dv "no.such.schema"."no.such.relation" +\des "no.such.schema"."no.such.foreign.server" +\dew "no.such.schema"."no.such.foreign.data.wrapper" +\df "no.such.schema"."no.such.function" +\dF "no.such.schema"."no.such.text.search.configuration" +\dFd "no.such.schema"."no.such.text.search.dictionary" +\dFp "no.such.schema"."no.such.text.search.parser" +\dFt "no.such.schema"."no.such.text.search.template" +\dg "no.such.schema"."no.such.role" +\dL "no.such.schema"."no.such.language" +\do "no.such.schema"."no.such.operator" +\dO "no.such.schema"."no.such.collation" +\dp "no.such.schema"."no.such.access.privilege" +\dP "no.such.schema"."no.such.partitioned.relation" +\drds "no.such.schema"."no.such.setting" +\dRp "no.such.schema"."no.such.publication" +\dRs "no.such.schema"."no.such.subscription" +\dT "no.such.schema"."no.such.data.type" +\dx "no.such.schema"."no.such.installed.extension" +\dX "no.such.schema"."no.such.extended.statistics" +\dy "no.such.schema"."no.such.event.trigger" + +-- again, but with current database and dotted schema qualifications. +\dt regression."no.such.schema"."no.such.table.relation" +\da regression."no.such.schema"."no.such.aggregate.function" +\dc regression."no.such.schema"."no.such.conversion" +\dC regression."no.such.schema"."no.such.cast" +\dd regression."no.such.schema"."no.such.object.description" +\dD regression."no.such.schema"."no.such.domain" +\di regression."no.such.schema"."no.such.index.relation" +\dm regression."no.such.schema"."no.such.materialized.view" +\ds regression."no.such.schema"."no.such.relation" +\dt regression."no.such.schema"."no.such.relation" +\dv regression."no.such.schema"."no.such.relation" +\df regression."no.such.schema"."no.such.function" +\dF regression."no.such.schema"."no.such.text.search.configuration" +\dFd regression."no.such.schema"."no.such.text.search.dictionary" +\dFp regression."no.such.schema"."no.such.text.search.parser" +\dFt regression."no.such.schema"."no.such.text.search.template" +\do regression."no.such.schema"."no.such.operator" +\dO regression."no.such.schema"."no.such.collation" +\dp regression."no.such.schema"."no.such.access.privilege" +\dP regression."no.such.schema"."no.such.partitioned.relation" +\dT regression."no.such.schema"."no.such.data.type" +\dX regression."no.such.schema"."no.such.extended.statistics" + +-- again, but with dotted database and dotted schema qualifications. +\dt "no.such.database"."no.such.schema"."no.such.table.relation" +\da "no.such.database"."no.such.schema"."no.such.aggregate.function" +\dc "no.such.database"."no.such.schema"."no.such.conversion" +\dC "no.such.database"."no.such.schema"."no.such.cast" +\dd "no.such.database"."no.such.schema"."no.such.object.description" +\dD "no.such.database"."no.such.schema"."no.such.domain" +\ddp "no.such.database"."no.such.schema"."no.such.default.access.privilege" +\di "no.such.database"."no.such.schema"."no.such.index.relation" +\dm "no.such.database"."no.such.schema"."no.such.materialized.view" +\ds "no.such.database"."no.such.schema"."no.such.relation" +\dt "no.such.database"."no.such.schema"."no.such.relation" +\dv "no.such.database"."no.such.schema"."no.such.relation" +\df "no.such.database"."no.such.schema"."no.such.function" +\dF "no.such.database"."no.such.schema"."no.such.text.search.configuration" +\dFd "no.such.database"."no.such.schema"."no.such.text.search.dictionary" +\dFp "no.such.database"."no.such.schema"."no.such.text.search.parser" +\dFt "no.such.database"."no.such.schema"."no.such.text.search.template" +\do "no.such.database"."no.such.schema"."no.such.operator" +\dO "no.such.database"."no.such.schema"."no.such.collation" +\dp "no.such.database"."no.such.schema"."no.such.access.privilege" +\dP "no.such.database"."no.such.schema"."no.such.partitioned.relation" +\dT "no.such.database"."no.such.schema"."no.such.data.type" +\dX "no.such.database"."no.such.schema"."no.such.extended.statistics" |
