PLPGSQL: How can I get the effected rows when use "execute" command in function - Mailing list pgsql-general

From Muiz
Subject PLPGSQL: How can I get the effected rows when use "execute" command in function
Date
Msg-id CAF2hCqznYOcmn3DOBVHb_W443Oz+QqSe6MpCTgoPyz2j+YTO9w@mail.gmail.com
Whole thread Raw
Responses Re: PLPGSQL: How can I get the effected rows when use "execute" command in function  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: PLPGSQL: How can I get the effected rows when use "execute" command in function  (Ernesto Quiniones <ernestoq@gmail.com>)
List pgsql-general
Dear all,

   Can I get the effected rows after executing sqls in function?
e.g.:

CREATE OR REPLACE FUNCTION execsqls(sqls character varying)
  RETURNS integer AS
$BODY$
DECLARE
BEGIN
           EXECUTE sqls;
           -- TODO-1: I want to know how many records the input sqls effects?
           RETURN effectedRows;
END; 
$BODY$
  LANGUAGE plpgsql;

test: select  execsqls('update mytable where name like ''%abc''')

--
Regards,
Muiz


pgsql-general by date:

Previous
From: Heiko Wundram
Date:
Subject: Limiting number of connections to PostgreSQL per IP (not per DB/user)?
Next
From: Pavel Stehule
Date:
Subject: Re: PLPGSQL: How can I get the effected rows when use "execute" command in function