Re: xmlconcat as variadic function - Mailing list pgsql-hackers

From Tom Lane
Subject Re: xmlconcat as variadic function
Date
Msg-id 4854.1226943251@sss.pgh.pa.us
Whole thread Raw
In response to xmlconcat as variadic function  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: xmlconcat as variadic function  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Here is a patch to reimplement the xmlconcat functionality as a variadic 
> function instead of a hardcoded special expression type.

What's the point of this?  I suppose making xmlconcat not a keyword is
some small advantage, but having it behave subtly differently from the
other xmlfoo functions isn't really all that nice.  And the change in
this error message is not for the better:

> *** 55,63 ****
>   (1 row) 
>   SELECT xmlconcat(1, 2);
> ! ERROR:  argument of XMLCONCAT must be type xml, not type integer
>   LINE 1: SELECT xmlconcat(1, 2);
> !                          ^
>   SELECT xmlconcat('bad', '<syntax');
>   ERROR:  invalid XML content
>   LINE 1: SELECT xmlconcat('bad', '<syntax');
> --- 55,64 ----
>   (1 row) 
>   SELECT xmlconcat(1, 2);
> ! ERROR:  function xmlconcat(integer, integer) does not exist
>   LINE 1: SELECT xmlconcat(1, 2);
> !                ^
> ! HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
>   SELECT xmlconcat('bad', '<syntax');
>   ERROR:  invalid XML content
>   LINE 1: SELECT xmlconcat('bad', '<syntax');

On the whole I think we should just leave it alone.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Pl/Perl function: Speed of the First time executing pl/perl function in connection;
Next
From: Andrew Dunstan
Date:
Subject: Re: Pl/Perl function: Speed of the First time executing pl/perl function in connection;