atom feed3 messages in org.postgresql.pgsql-adminRe: [SQL] rowcount function in postgr...
FromSent OnAttachments
Karthikeyan SundaramApr 7, 2007 10:33 am 
Rodrigo De LeónApr 7, 2007 10:54 am 
Uwe C. SchroederApr 7, 2007 11:58 am 
Subject:Re: [SQL] rowcount function in postgres???
From:Rodrigo De León (
Date:Apr 7, 2007 10:54:35 am

On 4/7/07, Karthikeyan Sundaram <> wrote:


I am using 8.1.0 postgres and trying to write a plpgsql block. In that I am inserting a row. I want to check to see if the row has been inserted or not.

In oracle we can say like this

begin insert into table_a values (1); if sql%rowcount > 0 then dbms.output.put_line('rows inserted'); else dbms.output.put_line('rows not inserted'); end if; end;

Is there something equal to sql%rowcount in postgres? Please help.

Regards skarthi