From: | Karthikeyan Sundaram <skarthi98(at)hotmail(dot)com> |
---|---|
To: | postgres admin <pgsql-admin(at)postgresql(dot)org>, postgres sql <pgsql-sql(at)postgresql(dot)org> |
Subject: | rowcount function in postgres??? |
Date: | 2007-04-07 17:33:19 |
Message-ID: | BAY131-W181F25E4A6D4AC7312545FB05B0@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-sql |
Hi,
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
_________________________________________________________________
It’s tax season, make sure to follow these few simple tips
http://articles.moneycentral.msn.com/Taxes/PreparationTips/PreparationTips.aspx?icid=WLMartagline
From | Date | Subject | |
---|---|---|---|
Next Message | tom12167 | 2007-04-07 17:47:41 | Porting and Exception handling |
Previous Message | Alvaro Herrera | 2007-04-06 22:08:27 | Re: alter user log entry, too much information ;) |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2007-04-07 17:51:00 | Re: rowcount function in postgres??? |
Previous Message | George Pavlov | 2007-04-07 00:05:37 | Re: dropping a schema and cross-schema dependencies |