Re: abusing plpgsql array variables

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: Ben <bench(at)silentmedia(dot)com>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: abusing plpgsql array variables
Date: 2008-09-10 23:48:19
Message-ID: b42b73150809101648h76c3d469lcae29dbc52bd1d6d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Sep 10, 2008 at 4:03 PM, Ben <bench(at)silentmedia(dot)com> wrote:
> If I want to pass in a text[] argument to a plpgsql function, at what array
> size am I asking for problems? 100? 10,000? 100,000?
>
> What severity of problems might I encounter? Bad performance? Postgres
> refusing to run my query? A crashed backend?

see for yourself:

postgres=# select length(array_to_string(array(select
generate_series(1,100000)), '|'));
length
--------
588894
(1 row)

Time: 107.283 ms

(array options can get inefficient if large, but it's mainly cpu bound stuff).

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mohd Fahadullah 2008-09-11 00:47:35 Re: Server installation problem using freebsd ports
Previous Message Tom Lane 2008-09-10 23:44:41 Re: postgres user account on OSX