mirror of https://github.com/citusdata/citus.git
make the tests parallelizeable
helper view table_fkeys_in_workers now allows filtering by schema so that a test case can print out foreign keys in its schema onlypull/2488/head
parent
b3d897039a
commit
4edb193f25
|
@ -36,6 +36,8 @@ SELECT
|
||||||
refd_relid::regclass::text
|
refd_relid::regclass::text
|
||||||
FROM
|
FROM
|
||||||
table_fkey_cols
|
table_fkey_cols
|
||||||
|
WHERE
|
||||||
|
"schema" = 'fkey_reference_table'
|
||||||
)
|
)
|
||||||
d $$ )).RESULT::json )::json )).* ;
|
d $$ )).RESULT::json )::json )).* ;
|
||||||
CREATE TABLE referenced_table(id int UNIQUE, test_column int);
|
CREATE TABLE referenced_table(id int UNIQUE, test_column int);
|
||||||
|
|
|
@ -36,6 +36,8 @@ SELECT
|
||||||
refd_relid::regclass::text
|
refd_relid::regclass::text
|
||||||
FROM
|
FROM
|
||||||
table_fkey_cols
|
table_fkey_cols
|
||||||
|
WHERE
|
||||||
|
"schema" = 'fkey_reference_table'
|
||||||
)
|
)
|
||||||
d $$ )).RESULT::json )::json )).* ;
|
d $$ )).RESULT::json )::json )).* ;
|
||||||
CREATE TABLE referenced_table(id int UNIQUE, test_column int);
|
CREATE TABLE referenced_table(id int UNIQUE, test_column int);
|
||||||
|
|
|
@ -17,7 +17,8 @@ SELECT rc.constraint_name AS "name",
|
||||||
kcu.column_name AS "column_name",
|
kcu.column_name AS "column_name",
|
||||||
uc_kcu.column_name AS "refd_column_name",
|
uc_kcu.column_name AS "refd_column_name",
|
||||||
format('%I.%I', kcu.table_schema, kcu.table_name)::regclass::oid AS relid,
|
format('%I.%I', kcu.table_schema, kcu.table_name)::regclass::oid AS relid,
|
||||||
format('%I.%I', uc_kcu.table_schema, uc_kcu.table_name)::regclass::oid AS refd_relid
|
format('%I.%I', uc_kcu.table_schema, uc_kcu.table_name)::regclass::oid AS refd_relid,
|
||||||
|
rc.constraint_schema AS "schema"
|
||||||
FROM information_schema.referential_constraints rc,
|
FROM information_schema.referential_constraints rc,
|
||||||
information_schema.key_column_usage kcu,
|
information_schema.key_column_usage kcu,
|
||||||
information_schema.key_column_usage uc_kcu
|
information_schema.key_column_usage uc_kcu
|
||||||
|
|
|
@ -28,6 +28,8 @@ SELECT
|
||||||
refd_relid::regclass::text
|
refd_relid::regclass::text
|
||||||
FROM
|
FROM
|
||||||
table_fkey_cols
|
table_fkey_cols
|
||||||
|
WHERE
|
||||||
|
"schema" = 'fkey_reference_table'
|
||||||
)
|
)
|
||||||
d $$ )).RESULT::json )::json )).* ;
|
d $$ )).RESULT::json )::json )).* ;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,8 @@ SELECT rc.constraint_name AS "name",
|
||||||
kcu.column_name AS "column_name",
|
kcu.column_name AS "column_name",
|
||||||
uc_kcu.column_name AS "refd_column_name",
|
uc_kcu.column_name AS "refd_column_name",
|
||||||
format('%I.%I', kcu.table_schema, kcu.table_name)::regclass::oid AS relid,
|
format('%I.%I', kcu.table_schema, kcu.table_name)::regclass::oid AS relid,
|
||||||
format('%I.%I', uc_kcu.table_schema, uc_kcu.table_name)::regclass::oid AS refd_relid
|
format('%I.%I', uc_kcu.table_schema, uc_kcu.table_name)::regclass::oid AS refd_relid,
|
||||||
|
rc.constraint_schema AS "schema"
|
||||||
FROM information_schema.referential_constraints rc,
|
FROM information_schema.referential_constraints rc,
|
||||||
information_schema.key_column_usage kcu,
|
information_schema.key_column_usage kcu,
|
||||||
information_schema.key_column_usage uc_kcu
|
information_schema.key_column_usage uc_kcu
|
||||||
|
|
Loading…
Reference in New Issue