From: Karthikeyan Sundaram <skarthi98@hotmail.com>
To: pgsql-admin@postgresql.org
To: pgsql-sql@postgresql.org
Subject: question on plpgsql block
Date: Thu, 12 Apr 2007 15:44:19 -0700
Message-ID: <BAY131-W19843640CD2CBC297E50AAB05E0@phx.gbl> (raw)
Hi Gurus,
I tried a plpgsql block from the php.
example
a='begin
insert into table a values (....);
insert into table b values (....)
insert into table c values (...)
select into p_var ... from table where condtion
update a set column = <new value> where condition;
commit;
end;';
I works fine when I call this block from php, whereas, I tried to copy the same value from the command line prompt or PGadmin GUI utility. Then it says "ERROR: current transaction is aborted, commands ignored until end of transaction block"
Why?
Did we need to do any special step up to execute a block or blocks won't execue from command line mode? Please advise.
Regards
skarthi
_________________________________________________________________
Your friends are close to you. Keep them that way.
http://spaces.live.com/signup.aspx=
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: skarthi98@hotmail.com, pgsql-admin@postgresql.org
Subject: Re: question on plpgsql block
In-Reply-To: <BAY131-W19843640CD2CBC297E50AAB05E0@phx.gbl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox