Anonymous PL functions?

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Anonymous PL functions?
Дата
Msg-id 44A1133E.8040507@magproductions.nl
обсуждение исходный текст
Список pgsql-general
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
alban@magproductions.nl

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 //

В списке pgsql-general по дате отправления:

Предыдущее
От: Hannes Dorbath
Дата:
Сообщение: TSearch vs. Homebrew
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: TSearch vs. Homebrew