Re: BUG #13652: Function names as a table prefiex by underscore, confused with array
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #13652: Function names as a table prefiex by underscore, confused with array |
| Дата | |
| Msg-id | 16142.1443542877@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | BUG #13652: Function names as a table prefiex by underscore, confused with array ("David G. Johnston" <david.g.johnston@gmail.com>) |
| Список | pgsql-bugs |
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Tuesday, September 29, 2015, <marisradu@gmail.com
> <javascript:_e(%7B%7D,'cvml','marisradu@gmail.com');>> wrote:
>> Select by _c(text) returns unexpected error:
>> # select _c('text');
>> ERROR: malformed array literal: "text"
> It's unfortunate that such an implementation detail is exposed in this
> situation but the name is still valid if you place it in double-quotes (I
> think...) so making it fail at any other time seems unnecessarily strict.
Actually the way to get this to work as desired is to cast the argument
to the right type:
select _c('text'::text);
Then you get a match at step 2 in the resolution sequence ("exact match
of argument types"), so the user-defined function wins out over the cast
interpretation.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера