1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-29 10:41:53 +03:00

Fix up text concatenation so that it accepts all the reasonable cases that

were accepted by prior Postgres releases.  This takes care of the loose end
left by the preceding patch to downgrade implicit casts-to-text.  To avoid
breaking desirable behavior for array concatenation, introduce a new
polymorphic pseudo-type "anynonarray" --- the added concatenation operators
are actually text || anynonarray and anynonarray || text.
This commit is contained in:
Tom Lane
2007-06-06 23:00:50 +00:00
parent 7dab4f75ca
commit 2d4db3675f
22 changed files with 301 additions and 109 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/functions.c,v 1.116 2007/04/27 22:05:47 tgl Exp $
* $PostgreSQL: pgsql/src/backend/executor/functions.c,v 1.117 2007/06/06 23:00:37 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -849,9 +849,9 @@ ShutdownSQLFunction(Datum arg)
* to be sure that the user is returning the type he claims.
*
* For a polymorphic function the passed rettype must be the actual resolved
* output type of the function; we should never see ANYARRAY, ANYENUM or
* ANYELEMENT as rettype. (This means we can't check the type during function
* definition of a polymorphic function.)
* output type of the function; we should never see a polymorphic pseudotype
* such as ANYELEMENT as rettype. (This means we can't check the type during
* function definition of a polymorphic function.)
*
* This function returns true if the sql function returns the entire tuple
* result of its final SELECT, and false otherwise. Note that because we
@ -874,6 +874,8 @@ check_sql_fn_retval(Oid func_id, Oid rettype, List *queryTreeList,
char fn_typtype;
Oid restype;
AssertArg(!IsPolymorphicType(rettype));
if (junkFilter)
*junkFilter = NULL; /* default result */