postgresql/src/backend/utils/adt
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
..
acl.c Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len). 2007-02-27 23:48:10 +00:00
array_userfuncs.c Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len). 2007-02-27 23:48:10 +00:00
arrayfuncs.c Support varlena fields with single-byte headers and unaligned storage. 2007-04-06 04:21:44 +00:00
arrayutils.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
ascii.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
bool.c Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
cash.c Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len). 2007-02-27 23:48:10 +00:00
char.c Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len). 2007-02-27 23:48:10 +00:00
date.c Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
datetime.c Fix a bug in input processing for the "interval" type. Previously, 2007-05-29 04:58:43 +00:00
datum.c Support varlena fields with single-byte headers and unaligned storage. 2007-04-06 04:21:44 +00:00
dbsize.c Fix a race condition that caused pg_database_size() and pg_tablespace_size() 2007-03-11 05:22:00 +00:00
domains.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
encode.c Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len). 2007-02-27 23:48:10 +00:00
enum.c Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
float.c Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
format_type.c Support enum data types. Along the way, use macros for the values of 2007-04-02 03:49:42 +00:00
formatting.c Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len). 2007-02-27 23:48:10 +00:00
genfile.c Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len). 2007-02-27 23:48:10 +00:00
geo_ops.c Remove copied comments from geo_ops.c source file and replace with new 2007-03-05 23:29:14 +00:00
geo_selfuncs.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
inet_net_ntop.c Fix another passel of include-file breakage. Kris Jurka, Tom Lane 2006-07-14 16:59:19 +00:00
inet_net_pton.c Fix another passel of include-file breakage. Kris Jurka, Tom Lane 2006-07-14 16:59:19 +00:00
int.c Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
int8.c Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
like.c Improve efficiency of LIKE/ILIKE code, especially for multi-byte charsets, 2007-06-02 02:03:42 +00:00
like_match.c Improve efficiency of LIKE/ILIKE code, especially for multi-byte charsets, 2007-06-02 02:03:42 +00:00
lockfuncs.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
mac.c Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
Makefile Support enum data types. Along the way, use macros for the values of 2007-04-02 03:49:42 +00:00
misc.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
nabstime.c Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len). 2007-02-27 23:48:10 +00:00
name.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
network.c Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
not_in.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
numeric.c Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
numutils.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
oid.c Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
oracle_compat.c Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len). 2007-02-27 23:48:10 +00:00
pg_locale.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
pg_lzcompress.c Support varlena fields with single-byte headers and unaligned storage. 2007-04-06 04:21:44 +00:00
pgstatfuncs.c Temporary fix for the problem that pg_stat_activity, inet_client_addr(), 2007-05-17 23:31:49 +00:00
pseudotypes.c Support enum data types. Along the way, use macros for the values of 2007-04-02 03:49:42 +00:00
quote.c Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len). 2007-02-27 23:48:10 +00:00
regexp.c Code cleanup for the new regexp UDFs: we can hardcode the OID and some 2007-03-28 22:59:37 +00:00
regproc.c Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
ri_triggers.c Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
rowtypes.c Add resetStringInfo(), which clears the content of a StringInfo, and 2007-03-03 19:32:55 +00:00
ruleutils.c Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
selfuncs.c Check return code from strxfrm on Windows since it has a 2007-05-05 17:05:48 +00:00
tid.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
timestamp.c Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
uuid.c Downgrade implicit casts to text to be assignment-only, except for the ones 2007-06-05 21:31:09 +00:00
varbit.c Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len). 2007-02-27 23:48:10 +00:00
varchar.c Support varlena fields with single-byte headers and unaligned storage. 2007-04-06 04:21:44 +00:00
varlena.c Support varlena fields with single-byte headers and unaligned storage. 2007-04-06 04:21:44 +00:00
version.c Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len). 2007-02-27 23:48:10 +00:00
xid.c Update CVS HEAD for 2007 copyright. Back branches are typically not 2007-01-05 22:20:05 +00:00
xml.c XPath fixes: 2007-05-21 17:10:29 +00:00