Revision 8141
Added by Aaron Marcuse-Kubitza over 11 years ago
schemas/functions.sql | ||
---|---|---|
643 | 643 |
-- |
644 | 644 |
|
645 | 645 |
CREATE FUNCTION mk_map_table(table_ text) RETURNS void |
646 |
LANGUAGE plpgsql STRICT
|
|
646 |
LANGUAGE sql STRICT |
|
647 | 647 |
AS $_$ |
648 |
BEGIN |
|
649 |
PERFORM functions.create_if_not_exists($$ |
|
650 |
CREATE TABLE $$||table_||$$ |
|
648 |
SELECT functions.create_if_not_exists($$ |
|
649 |
CREATE TABLE $$||$1||$$ |
|
651 | 650 |
( |
652 | 651 |
LIKE functions.map INCLUDING ALL |
653 | 652 |
) |
654 |
$$); |
|
655 |
END; |
|
653 |
$$) |
|
656 | 654 |
$_$; |
657 | 655 |
|
658 | 656 |
|
Also available in: Unified diff
schemas/functions.sql: mk_map_table(): Use the sql language instead of plpgsql because EXECUTE is not used directly, so plpgsql is not actually needed