Re: Postgres 13.5 out parameter argument with explicit cast fails with argument is not writable
От | Tom Lane |
---|---|
Тема | Re: Postgres 13.5 out parameter argument with explicit cast fails with argument is not writable |
Дата | |
Msg-id | 2959722.1644881309@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Postgres 13.5 out parameter argument with explicit cast fails with argument is not writable ("Delaney, Ed" <Ed.Delaney@ellucian.com>) |
Ответы |
Re: Postgres 13.5 out parameter argument with explicit cast fails with argument is not writable
|
Список | pgsql-bugs |
"Delaney, Ed" <Ed.Delaney@ellucian.com> writes: > create or replace procedure bar () > language plpgsql > as $procedure$ > declare > lv_somestring character varying (4000); > begin > call foo(lv_somestring::character varying); -- note cast > raise notice 'lv_somestring: %', lv_somestring; > end; > $procedure$; I think you're out of luck on that. Releases before last November ignored that cast entirely, thinking it a no-op. Current releases do not ignore it, recognizing that in fact it has to be understood as casting to varchar-of-unspecified-length. But then the argument isn't a bare variable anymore. We debated about whether to back-patch such a behavioral change, and maybe we shouldn't have. But there are scenarios in which the old behavior makes it just impossible to do things, eg you may not be able to get a UNION to produce the desired type. On balance we felt this was a bug fix. regards, tom lane
В списке pgsql-bugs по дате отправления: