Re: how to get the effected row after execute a query

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: how to get the effected row after execute a query
Дата
Msg-id CAFj8pRBAVgfCzrfFzJScdMdKTqcAmRnBRzLzf5zGyDXYcQ6zGA@mail.gmail.com
обсуждение исходный текст
Ответ на how to get the effected row after execute a query  (EazonGuo <eazonguo@gmail.com>)
Список pgsql-hackers
Hello

2011/8/19 EazonGuo <eazonguo@gmail.com>:
> Hello, I have a question. In SQL Server, we can use @@rowcount to get the
> efftected row which record last query 's  effected row .So I have a
> question:
> In Postgresql, how we can get the effected row? Is there some similar
> functions to complete this?
>

It depends on API hat you use. You can use GET DIAGNOSTICS statement
in PL/pgSQL. On client side, you should to use a PQcmdtuples function
or their equivalent (depends on interface).

http://www.postgresql.org/docs/8.4/static/libpq-exec.html#LIBPQ-EXEC-SELECT-INFO

Regards

Pavel Stehule

>
> --
> Best regards
> Eazon
>


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Shigeru Hanada
Дата:
Сообщение: Re: Change format of FDW options used in \d* commands
Следующее
От: Kohei KaiGai
Дата:
Сообщение: Re: [v9.1] sepgsql - userspace access vector cache