Revision 12265
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/schemas/util.sql | ||
---|---|---|
2012 | 2012 |
|
2013 | 2013 |
|
2014 | 2014 |
-- |
2015 |
-- Name: rematerialize_query(text, text); Type: FUNCTION; Schema: util; Owner: - |
|
2016 |
-- |
|
2017 |
|
|
2018 |
CREATE FUNCTION rematerialize_query(table_esc text, sql text) RETURNS void |
|
2019 |
LANGUAGE sql |
|
2020 |
AS $_$ |
|
2021 |
SELECT util.drop_table($1); |
|
2022 |
SELECT util.materialize_query($1, $2); |
|
2023 |
$_$; |
|
2024 |
|
|
2025 |
|
|
2026 |
-- |
|
2027 |
-- Name: FUNCTION rematerialize_query(table_esc text, sql text); Type: COMMENT; Schema: util; Owner: - |
|
2028 |
-- |
|
2029 |
|
|
2030 |
COMMENT ON FUNCTION rematerialize_query(table_esc text, sql text) IS ' |
|
2031 |
idempotent, but repeats action each time |
|
2032 |
'; |
|
2033 |
|
|
2034 |
|
|
2035 |
-- |
|
2015 | 2036 |
-- Name: rematerialize_view(text, regclass); Type: FUNCTION; Schema: util; Owner: - |
2016 | 2037 |
-- |
2017 | 2038 |
|
Also available in: Unified diff
schemas/util.sql: added rematerialize_query()