git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 78212f2) | patch
Convert the reg* input functions to report (most) errors softly.
2022年12月27日 17:26:01 +0000 (12:26 -0500)
2022年12月27日 17:26:01 +0000 (12:26 -0500)
commit 858e776c84f48841e7e16fba7b690b76e54f3675
Convert the reg* input functions to report (most) errors softly.

This is not really complete, but it catches most cases of practical
interest. The main omissions are:

* regtype, regprocedure, and regoperator parse type names by
calling the main grammar, so any grammar-detected syntax error
will still be a hard error. Also, if one includes a type
modifier in such a type specification, errors detected by the
typmodin function will be hard errors.

* Lookup errors are handled just by passing missing_ok = true
to the relevant catalog lookup function. Because we've used
quite a restrictive definition of "missing_ok", this means that
edge cases such as "the named schema exists, but you lack
USAGE permission on it" are still hard errors.

It would make sense to me to replace most/all missing_ok
parameters with an escontext parameter and then allow these
additional lookup failure cases to be trapped too. But that's
a job for some other day.

Discussion: https://postgr.es/m/3342239.1671988406@sss.pgh.pa.us
16 files changed:
src/backend/catalog/objectaddress.c diff | blob | blame | history
src/backend/parser/parse_type.c diff | blob | blame | history
src/backend/tsearch/dict_thesaurus.c diff | blob | blame | history
src/backend/utils/adt/misc.c diff | blob | blame | history
src/backend/utils/adt/regproc.c diff | blob | blame | history
src/backend/utils/adt/tsvector_op.c diff | blob | blame | history
src/backend/utils/cache/ts_cache.c diff | blob | blame | history
src/backend/utils/fmgr/funcapi.c diff | blob | blame | history
src/include/parser/parse_type.h diff | blob | blame | history
src/include/utils/regproc.h diff | blob | blame | history
src/pl/plperl/plperl.c diff | blob | blame | history
src/pl/plpgsql/src/pl_gram.y diff | blob | blame | history
src/pl/plpython/plpy_spi.c diff | blob | blame | history
src/pl/tcl/pltcl.c diff | blob | blame | history
src/test/regress/expected/regproc.out diff | blob | blame | history
src/test/regress/sql/regproc.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /