pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Hans Spaans <pgsql-admin@lists.hansspaans.nl>
Cc: pgsql-admin@postgresql.org
Subject: Re: concat_ws
Date: Sun, 03 Aug 2003 14:56:15 -0700
Message-ID: <3F2D84FF.3070304@joeconway.com> (raw)
In-Reply-To: <6571.1059934474@sss.pgh.pa.us>
References: <20030803131931.GD4326@sch01r01.nexit.nl>
	<26941.1059926135@sss.pgh.pa.us>
	<3F2D4B3B.3050405@joeconway.com>
	<6571.1059934474@sss.pgh.pa.us>

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




view thread (15+ messages)  latest in thread

Message-ID: <3F2D84FF.3070304@joeconway.com>
Permalink:  ../3F2D84FF.3070304@joeconway.com/
Also on:    postgresql.org/message-id/3F2D84FF.3070304@joeconway.com

 · 

reply

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: mail@joeconway.com, tgl@sss.pgh.pa.us, pgsql-admin@lists.hansspaans.nl
  Subject: Re: concat_ws
  In-Reply-To: <3F2D84FF.3070304@joeconway.com>
  References: <20030803131931.GD4326@sch01r01.nexit.nl> <26941.1059926135@sss.pgh.pa.us> <3F2D4B3B.3050405@joeconway.com> <6571.1059934474@sss.pgh.pa.us> <3F2D84FF.3070304@joeconway.com>

* 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