Re: concat_ws

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Hans Spaans <pgsql-admin(at)lists(dot)hansspaans(dot)nl>, pgsql-admin(at)postgresql(dot)org
Subject: Re: concat_ws
Date: 2003-08-03 21:56:15
Message-ID: 3F2D84FF.3070304@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-hackers

Tom Lane wrote:
> It seems to be running out of memory. I'm not sure what's eating so
> much RAM --- the expression isn't that complex. Also it seems that
> elog.c's ability to handle a shortage of memory has regressed ...
> 'ERROR: ERRORDATA_STACK_SIZE exceeded' is better than a core dump,
> I suppose, but it's not supposed to fail at all ...
>
> Anyway, seems we have a couple different bugs to chase in CVS tip.
>

Another piece of the puzzle -- if the functions are defined:
...language sql IMMUTABLE STRICT;
instead of just
...language sql IMMUTABLE;
the function returns immediately even with 32 arguments (on 7.4devel):

regression=# explain analyze 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','25','26','27','28','29','30','31');
QUERY PLAN
----------------------------------------------------------------------------------
Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.00..0.00
rows=1 loops=1)
Total runtime: 0.02 msec
(2 rows)

Also worth noting, without STRICT, even a plain EXPLAIN *without*
ANALYZE causes the problem to show itself.

Joe

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2003-08-03 22:24:52 Re: concat_ws
Previous Message Tom Lane 2003-08-03 18:14:34 Re: concat_ws

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-08-03 22:24:52 Re: concat_ws
Previous Message Troels Arvin 2003-08-03 20:06:35 Re: AUTO_INCREMENT patch