Cause CHAR(n) to TEXT or VARCHAR conversion to automatically strip trailing

Tom Lane <tgl@sss.pgh.pa.us>

Commit: f45df8c0144005739d09387cb594baaaa08295a6
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2003-05-26T00:11:29Z
Releases: 7.4.1
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).

Files

PathChange+/−
contrib/array/array_iterator.c modified +0 −37
contrib/array/array_iterator.h modified +0 −5
contrib/array/array_iterator.sql.in modified +0 −53
doc/src/sgml/release.sgml modified +2 −1
doc/src/sgml/typeconv.sgml modified +35 −40
src/backend/optimizer/path/indxpath.c modified +273 −286
src/backend/optimizer/util/pathnode.c modified +4 −5
src/backend/parser/parse_coerce.c modified +88 −62
src/backend/parser/parse_func.c modified +115 −98
src/backend/parser/parse_oper.c modified +18 −403
src/backend/utils/adt/selfuncs.c modified +90 −54
src/backend/utils/adt/varchar.c modified +6 −187
src/backend/utils/cache/lsyscache.c modified +28 −1
src/include/catalog/catversion.h modified +2 −2
src/include/catalog/pg_amop.h modified +14 −14
src/include/catalog/pg_amproc.h modified +4 −4
src/include/catalog/pg_cast.h modified +3 −3
src/include/catalog/pg_opclass.h modified +13 −2
src/include/catalog/pg_operator.h modified +21 −54
src/include/catalog/pg_proc.h modified +32 −39
src/include/optimizer/paths.h modified +3 −2
src/include/parser/parse_func.h modified +11 −1
src/include/utils/builtins.h modified +1 −10
src/include/utils/lsyscache.h modified +2 −1
src/test/regress/expected/name.out modified +9 −9
src/test/regress/expected/opr_sanity.out modified +96 −72
src/test/regress/expected/rules.out modified +3 −3
src/test/regress/expected/select_having_1.out modified +5 −5
src/test/regress/expected/select_having.out modified +5 −5
src/test/regress/expected/select_implicit_1.out modified +6 −6
src/test/regress/expected/select_implicit.out modified +6 −6
src/test/regress/expected/strings.out modified +11 −11
src/test/regress/expected/union.out modified +7 −9
src/test/regress/sql/opr_sanity.sql modified +91 −62
src/test/regress/sql/strings.sql modified +1 −1
src/test/regress/sql/union.sql modified +2 −2