I wonder if it would be possible/feasable to have anonymous PL functions in PostgreSQL? I'm thinking of something along the lines of:

EXECUTE $
DECLARE
        tableName text;
BEGIN;
        FOR tableName
        IN SELECT table_name
            FROM information_schema.tables
            WHERE table_name LIKE 'mm_%' LOOP
                EXECUTE 'DROP TABLE ' || tableName;
        END LOOP;
END;
$ () LANGUAGE 'plpgsql';

I don't really need this, but I think it'd be nice to be able to. This way you could call procedural language code from the psql command line, for example.

Regards,
--
Alban Hertroys
[EMAIL PROTECTED]

magproductions b.v.

T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
   7500 AK Enschede

// Integrate Your World //

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to