Number of rows affected by an update

Поиск
Список
Период
Сортировка
Искать

Number of rows affected by an update

От:
"David Witham" <davidw@unidial.com.au>
Дата:
Hi,

Is there a way of capturing how many rows a select, delete or update affect from within a PL/pgSQL function?

Thanks,

David Witham
Unidial


Re: Number of rows affected by an update

От:
Tomasz Myrta <jasiek@klaster.net>
Дата:
Uz.ytkownik David Witham napisa?:
> Hi,
> 
> Is there a way of capturing how many rows a select, delete or update affect from within a PL/pgSQL function?
Read Postgres documentation.
19.5.5. Obtaining result status

GET DIAGNOSTICS var_integer = ROW_COUNT;

Regards,
Tomasz Myrta


FAQ