PLPGSQL: How can I get the effected rows when use "execute" command in function

Поиск
Список
Период
Сортировка
От Muiz
Тема PLPGSQL: How can I get the effected rows when use "execute" command in function
Дата
Msg-id CAF2hCqznYOcmn3DOBVHb_W443Oz+QqSe6MpCTgoPyz2j+YTO9w@mail.gmail.com
обсуждение исходный текст
Ответы 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>)
Список 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 по дате отправления:

Предыдущее
От: Heiko Wundram
Дата:
Сообщение: Limiting number of connections to PostgreSQL per IP (not per DB/user)?
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: PLPGSQL: How can I get the effected rows when use "execute" command in function