From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joe Conway <mail@joeconway.com>
Cc: Hans Spaans <pgsql-admin@lists.hansspaans.nl>
Cc: pgsql-admin@postgresql.org
Subject: Re: concat_ws
Date: Sun, 03 Aug 2003 19:13:02 -0400
Message-ID: <2270.1059952382@sss.pgh.pa.us> (raw)
In-Reply-To: <3F2D4B3B.3050405@joeconway.com>
References: <20030803131931.GD4326@sch01r01.nexit.nl>
<26941.1059926135@sss.pgh.pa.us>
<3F2D4B3B.3050405@joeconway.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, mail@joeconway.com, pgsql-admin@lists.hansspaans.nl
Subject: Re: concat_ws
In-Reply-To: <2270.1059952382@sss.pgh.pa.us>
References: <20030803131931.GD4326@sch01r01.nexit.nl> <26941.1059926135@sss.pgh.pa.us> <3F2D4B3B.3050405@joeconway.com> <2270.1059952382@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox