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 | 15232.1443540944@sss.pgh.pa.us обсуждение |
| Ответ на | BUG #13652: Function names as a table prefiex by underscore, confused with array (marisradu@gmail.com) |
| Список | pgsql-bugs |
marisradu@gmail.com writes:
> Creating a method "_c()" as:
> create or replace function _c(text) returns text as $$
> select $1;
> $$ language sql immutable;
> and a table "c" as:
> create table c (id int);
> Select by _c(text) returns unexpected error:
> # select _c('text');
> ERROR: malformed array literal: "text"
> LINE 1: select _c('text');
> ^
> DETAIL: Array value must start with "{" or dimension information.
The reason that happens is that the internal name of the array type c[]
is "_c", and the order of search for ambiguous function names is such
that a function-style cast interpretation will be selected over an
actual function; see
http://www.postgresql.org/docs/9.4/static/typeconv-func.html
particularly step 3.
I'm afraid that there's not much we can do about this without breaking
cases that people are accustomed to have working.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера