postgresql/src
Tom Lane 31edbadf4a Downgrade implicit casts to text to be assignment-only, except for the ones
from the other string-category types; this eliminates a lot of surprising
interpretations that the parser could formerly make when there was no directly
applicable operator.

Create a general mechanism that supports casts to and from the standard string
types (text,varchar,bpchar) for *every* datatype, by invoking the datatype's
I/O functions.  These new casts are assignment-only in the to-string direction,
explicit-only in the other, and therefore should create no surprising behavior.
Remove a bunch of thereby-obsoleted datatype-specific casting functions.

The "general mechanism" is a new expression node type CoerceViaIO that can
actually convert between *any* two datatypes if their external text
representations are compatible.  This is more general than needed for the
immediate feature, but might be useful in plpgsql or other places in future.

This commit does nothing about the issue that applying the concatenation
operator || to non-text types will now fail, often with strange error messages
due to misinterpreting the operator as array concatenation.  Since it often
(not always) worked before, we should either make it succeed or at least give
a more user-friendly error; but details are still under debate.

Peter Eisentraut and Tom Lane
2007-06-05 21:31:09 +00:00
..
backend Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
bin Remove gratuitous response messages from utility programs. 2007-06-04 10:02:40 +00:00
include Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
interfaces Update expected files for textual changes 2007-06-04 07:48:17 +00:00
makefiles Add $(CFLAGS) to the simplified build rule for .so libraries on Darwin. 2006-11-28 05:45:43 +00:00
pl Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
port Silence mingw compiler warning 2007-04-18 08:32:40 +00:00
template
test Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
timezone Make some messages more consistent 2007-05-31 15:13:06 +00:00
tools Applied Joachim's patch for ecpg_config.h creation on Vista. 2007-05-27 11:16:41 +00:00
tutorial Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len). 2007-02-27 23:48:10 +00:00
bcc32.mak Remove old-style win32 client-only visual c++ build infrastructure for everything except 2007-03-05 14:18:38 +00:00
DEVELOPERS
Makefile Remove remains of old depend target. 2007-01-20 17:16:17 +00:00
Makefile.global.in Contrib module uuid-ossp for generating UUID values using the OSSP UUID 2007-04-21 17:26:18 +00:00
Makefile.shlib Change $(CC) to $(COMPILER) on Solaris gcc so -m64 is passed into the 2007-02-20 22:45:57 +00:00
nls-global.mk When merging PO files, take into consideration translations in other PO 2006-04-05 13:40:15 +00:00
win32.mak Remove old-style win32 client-only visual c++ build infrastructure for everything except 2007-03-05 14:18:38 +00:00