Cause CHAR(n) to TEXT or VARCHAR conversion to automatically strip trailing
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 26 May 2003 00:11:29 +0000 (00:11 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 26 May 2003 00:11:29 +0000 (00:11 +0000)
commitf45df8c0144005739d09387cb594baaaa08295a6
tree45bf02ceab43e8eb24ff7c961cff9a89e3db2770
parent297c1658ed35dc0ac4a13c190f29cc5e2ad49a0b
Cause CHAR(n) to TEXT or VARCHAR conversion to automatically strip trailing
blanks, in hopes of reducing the surprise factor for newbies.  Remove
redundant operators for VARCHAR (it depends wholly on TEXT operations now).
Clean up resolution of ambiguous operators/functions to avoid surprising
choices for domains: domains are treated as equivalent to their base types
and binary-coercibility is no longer considered a preference item when
choosing among multiple operators/functions.  IsBinaryCoercible now correctly
reflects the notion that you need *only* relabel the type to get from type
A to type B: that is, a domain is binary-coercible to its base type, but
not vice versa.  Various marginal cleanup, including merging the essentially
duplicate resolution code in parse_func.c and parse_oper.c.  Improve opr_sanity
regression test to understand about binary compatibility (using pg_cast),
and fix a couple of small errors in the catalogs revealed thereby.
Restructure "special operator" handling to fetch operators via index opclasses
rather than hardwiring assumptions about names (cleans up the pattern_ops
stuff a little).
36 files changed:
contrib/array/array_iterator.c
contrib/array/array_iterator.h
contrib/array/array_iterator.sql.in
doc/src/sgml/release.sgml
doc/src/sgml/typeconv.sgml
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/util/pathnode.c
src/backend/parser/parse_coerce.c
src/backend/parser/parse_func.c
src/backend/parser/parse_oper.c
src/backend/utils/adt/selfuncs.c
src/backend/utils/adt/varchar.c
src/backend/utils/cache/lsyscache.c
src/include/catalog/catversion.h
src/include/catalog/pg_amop.h
src/include/catalog/pg_amproc.h
src/include/catalog/pg_cast.h
src/include/catalog/pg_opclass.h
src/include/catalog/pg_operator.h
src/include/catalog/pg_proc.h
src/include/optimizer/paths.h
src/include/parser/parse_func.h
src/include/utils/builtins.h
src/include/utils/lsyscache.h
src/test/regress/expected/name.out
src/test/regress/expected/opr_sanity.out
src/test/regress/expected/rules.out
src/test/regress/expected/select_having.out
src/test/regress/expected/select_having_1.out
src/test/regress/expected/select_implicit.out
src/test/regress/expected/select_implicit_1.out
src/test/regress/expected/strings.out
src/test/regress/expected/union.out
src/test/regress/sql/opr_sanity.sql
src/test/regress/sql/strings.sql
src/test/regress/sql/union.sql