Re: concat_ws

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: concat_ws
Дата
Msg-id 2270.1059952382@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: concat_ws  (Joe Conway <mail@joeconway.com>)
Ответы Re: concat_ws  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
Joe Conway <mail@joeconway.com> writes:
> regression=# select
>
concat_ws('~','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24');
> ERROR:  ERRORDATA_STACK_SIZE exceeded

With the removal of some overoptimistic code in elog.c, I get

test=#  select
concat_ws('~','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24');
ERROR:  out of memory
DETAIL:  Failed on request of size 12.
CONTEXT:  SQL function "concat_ws" during inlining
SQL function "concat_ws" during inlining
SQL function "concat_ws" during inlining
SQL function "concat_ws" during inlining
SQL function "concat_ws" during inlining
SQL function "concat_ws" during inlining
SQL function "concat_ws" during inlining
SQL function "concat_ws" during inlining
SQL function "concat_ws" during startup
test=#

which at least gives some clue what's going wrong.

There is some code in the function inliner to abandon inlining if an
input expression is "too expensive", but its notion of "too expensive"
is currently just "contains subselects".  I'm going to see if it helps
to reject inlining when the input grows "too large", for some value of
"too large".

            regards, tom lane

В списке pgsql-admin по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: concat_ws
Следующее
От: Joe Conway
Дата:
Сообщение: Re: [HACKERS] concat_ws