Re: stable function called for every row?

From: Gerhard Heift <ml-postgresql-20081012-3518(at)gheift(dot)de>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: stable function called for every row?
Date: 2009-01-07 20:16:04
Message-ID: 20090107201604.GC21538@kawo1.rwth-aachen.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I isolated my problem a little bit:

CREATE FUNCTION get_array() RETURNS integer[] AS
$BODY$
BEGIN
RAISE INFO 'get_array';
RETURN ARRAY[1, 2];
END
$BODY$ LANGUAGE 'plpgsql' STABLE;

And now

SELECT * FROM generate_series(1,3) a(b) where array[b] <@ core.get_array();

gives me:

INFO: get_array
INFO: get_array
INFO: get_array
b
---
1
2
(2 rows)

Why?? Wlli functions which returns an array not be cached?

Regards,
Gerhard

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kirk Strauser 2009-01-07 20:16:29 Re: FreeBSD and large shared_buffers a no-go?
Previous Message Karsten Hilbert 2009-01-07 19:15:50 Re: encoding of PostgreSQL messages