Revision 9824
Added by Aaron Marcuse-Kubitza over 11 years ago
schemas/util.sql | ||
---|---|---|
687 | 687 |
|
688 | 688 |
|
689 | 689 |
-- |
690 |
-- Name: eval(text); Type: FUNCTION; Schema: util; Owner: - |
|
691 |
-- |
|
692 |
|
|
693 |
CREATE FUNCTION eval(sql text) RETURNS void |
|
694 |
LANGUAGE plpgsql STRICT |
|
695 |
AS $$ |
|
696 |
BEGIN |
|
697 |
RAISE NOTICE '%', sql; |
|
698 |
EXECUTE sql; |
|
699 |
END; |
|
700 |
$$; |
|
701 |
|
|
702 |
|
|
703 |
-- |
|
690 | 704 |
-- Name: existing_cols(regclass, text[]); Type: FUNCTION; Schema: util; Owner: - |
691 | 705 |
-- |
692 | 706 |
|
Also available in: Unified diff
schemas/util.sql: added eval() to allow running EXECUTE outside of a function (and to echo the command that is run)