Merge pull request #45 from CartoDB/CDB-3743

CDB_QueryTables returns only results for schemas associated to Relation-Names
This commit is contained in:
Raul Ochoa
2014-08-01 18:14:53 +02:00
2 changed files with 22 additions and 1 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ BEGIN
inp AS (
SELECT
xpath('//x:Relation-Name/text()', exp, ARRAY[ARRAY['x', 'http://www.postgresql.org/2009/explain']]) as x,
xpath('//x:Schema/text()', exp, ARRAY[ARRAY['x', 'http://www.postgresql.org/2009/explain']]) as s
xpath('//x:Relation-Name/../x:Schema/text()', exp, ARRAY[ARRAY['x', 'http://www.postgresql.org/2009/explain']]) as s
)
SELECT unnest(x)::name as p, unnest(s)::name as sc from inp
LOOP