Fix silly bug: ordering of functions
This commit is contained in:
parent
1c637f8689
commit
d59b826d37
@ -132,6 +132,19 @@ $$
|
|||||||
LANGUAGE plpgsql;
|
LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION cartodb._cdb_dbname_of_foreign_table(reloid oid)
|
||||||
|
RETURNS TEXT AS $$
|
||||||
|
SELECT option_value FROM pg_options_to_table((
|
||||||
|
|
||||||
|
SELECT fs.srvoptions
|
||||||
|
FROM pg_foreign_table ft
|
||||||
|
LEFT JOIN pg_foreign_server fs ON ft.ftserver = fs.oid
|
||||||
|
WHERE ft.ftrelid = reloid
|
||||||
|
|
||||||
|
)) WHERE option_name='dbname';
|
||||||
|
$$ LANGUAGE SQL;
|
||||||
|
|
||||||
|
|
||||||
-- Return a set of (dbname, schema_name, table_name, updated_at)
|
-- Return a set of (dbname, schema_name, table_name, updated_at)
|
||||||
-- It is aware of foreign tables
|
-- It is aware of foreign tables
|
||||||
-- It assumes the local (schema_name, table_name) map to the remote ones with the same name
|
-- It assumes the local (schema_name, table_name) map to the remote ones with the same name
|
||||||
@ -165,19 +178,6 @@ AS $$
|
|||||||
$$ LANGUAGE SQL;
|
$$ LANGUAGE SQL;
|
||||||
|
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION cartodb._cdb_dbname_of_foreign_table(reloid oid)
|
|
||||||
RETURNS TEXT AS $$
|
|
||||||
SELECT option_value FROM pg_options_to_table((
|
|
||||||
|
|
||||||
SELECT fs.srvoptions
|
|
||||||
FROM pg_foreign_table ft
|
|
||||||
LEFT JOIN pg_foreign_server fs ON ft.ftserver = fs.oid
|
|
||||||
WHERE ft.ftrelid = reloid
|
|
||||||
|
|
||||||
)) WHERE option_name='dbname';
|
|
||||||
$$ LANGUAGE SQL;
|
|
||||||
|
|
||||||
|
|
||||||
-- Return the last updated time of a set of tables
|
-- Return the last updated time of a set of tables
|
||||||
-- It is aware of foreign tables
|
-- It is aware of foreign tables
|
||||||
-- It assumes the local (schema_name, table_name) map to the remote ones with the same name
|
-- It assumes the local (schema_name, table_name) map to the remote ones with the same name
|
||||||
|
Loading…
Reference in New Issue
Block a user