Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > execute plpgsl ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 3458 of 3702
Post > Topic >>

execute plpgsl like "normal" sql

by christian.kindler@[EMAIL PROTECTED] ("Christian Kindler") May 9, 2008 at 12:00 PM

Hi

Is there a possibility to execute pl/pgsql syntax like normal sql simmilar
to sql+ from oracle?

The question is: if I want to execute soemthing like this:
--File foo.sql:
begin
 for id in select id from mytable loop
   update myothertable set payed = true where fk_id = id;
 end loop;
end;

Do I have to create a procedure or can I simply run the above statement
via 
psql -D foo < foo.sql

Reason is, that I create pq/psql procedures (more complex than this
example) at runtime in my client app and do not want to store the
procedures permanent in my database schema. I would like to avoid create
function / drop function statements.

Thanks 
Chris
-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@[EMAIL
PROTECTED]
 
Sent via pgsql-sql mailing list (pgsql-sql@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
 




 2 Posts in Topic:
execute plpgsl like "normal" sql
christian.kindler@[EMAIL   2008-05-09 12:00:54 
Re: execute plpgsl like "normal" sql
christian.kindler@[EMAIL   2008-05-09 17:00:34 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 6 15:44:42 CDT 2008.