Thread: execute plpgsl like "normal" sql
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: beginfor 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 wantto 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@gmx
Thanks! Chris -------- Original-Nachricht -------- > Datum: Fri, 9 May 2008 23:14:44 +1000 > Von: imad <immaad@gmail.com> > An: "Christian Kindler" <christian.kindler@gmx.net> > Betreff: Re: [SQL] execute plpgsl like "normal" sql > Anonymous blocks are not supported in PostgreSQL. > -- GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@gmx