Return Multiple Rows from Store Function

From: Brahmam Eswar <brahmam1234(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Return Multiple Rows from Store Function
Date: 2018-07-27 09:24:25
Message-ID: CA+wLFo0wfxTOpWrGQsSa-8tG1HDBVSgmP+8FvD6A+4vMdCH=mA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi ,

Returning multiple rows from store functions using "RETURNS TABLE" and
RETURN QUERY. The results set may have more than 50k records. Does it give
any performance issues related to memory? if yes how to avoid it

CREATE OR REPLACE FUNCTION funcq(COL1 character varying)
)
RETURNS TABLE
( a VARCHAR,
b VARCHAR,
c varchar)
AS $$

BEGIN

RETURN QUERY SELECT a,b,c from table1 where C= COL1;

END;
$$
LANGUAGE plpgsql;

--
Thanks & Regards,
Brahmeswara Rao J.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2018-07-27 09:47:11 Re: Return Multiple Rows from Store Function
Previous Message xOChilpili 2018-07-27 08:34:21 Publication/Subscription Questions