Re: PL/pgSQL EXECUTE '..' USING with unknown - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PL/pgSQL EXECUTE '..' USING with unknown
Date
Msg-id 129.1281042701@sss.pgh.pa.us
Whole thread Raw
In response to PL/pgSQL EXECUTE '..' USING with unknown  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: PL/pgSQL EXECUTE '..' USING with unknown
List pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> There's a little problem with EXECUTE USING when the parameters are of 
> type unknown (going back to 8.4 where EXECUTE USING was introduced):

> do $$
> BEGIN
>    EXECUTE 'SELECT to_date($1, $2)' USING '17-DEC-80', 'DD-MON-YY';
> END;
> $$;
> ERROR:  failed to find conversion function from unknown to text

This example doesn't seem terribly compelling.  Why would you bother
using USING with constants?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Drop one-argument string_agg? (was Re: [BUGS] string_agg delimiter having no effect with order by)
Next
From: Andrew Dunstan
Date:
Subject: Re: PL/pgSQL EXECUTE '..' USING with unknown