@@ -1020,12 +1020,12 @@ func TestPgConstraintIndexes(t *testing.T) {
10201020 {
10211021 // We don't care about the result, we just want to make sure it doens't error
10221022 Query : "SELECT true as sametable, conname," +
1023- "pg_catalog.pg_get_constraintdef(r.oid, true) as condef," +
1024- "conrelid::pg_catalog.regclass AS ontable " +
1025- "FROM pg_catalog.pg_constraint r " +
1026- "WHERE r.conrelid = '145181' AND r.contype = 'f' " +
1027- " AND conparentid = 0 " +
1028- "ORDER BY conname" ,
1023+ "pg_catalog.pg_get_constraintdef(r.oid, true) as condef," +
1024+ "conrelid::pg_catalog.regclass AS ontable " +
1025+ "FROM pg_catalog.pg_constraint r " +
1026+ "WHERE r.conrelid = '145181' AND r.contype = 'f' " +
1027+ " AND conparentid = 0 " +
1028+ "ORDER BY conname" ,
10291029 },
10301030 },
10311031 },
@@ -1510,10 +1510,10 @@ func TestPgIndex(t *testing.T) {
15101510 Assertions : []ScriptTestAssertion {
15111511 {
15121512 Query : "SELECT i.* from pg_class c " +
1513- "JOIN pg_index i ON c.oid = i.indexrelid " +
1514- "JOIN pg_namespace n ON c.relnamespace = n.oid " +
1515- "WHERE n.nspname = 'testschema' and left(c.relname, 5) <> 'dolt_' " +
1516- "ORDER BY 1;" ,
1513+ "JOIN pg_index i ON c.oid = i.indexrelid " +
1514+ "JOIN pg_namespace n ON c.relnamespace = n.oid " +
1515+ "WHERE n.nspname = 'testschema' and left(c.relname, 5) <> 'dolt_' " +
1516+ "ORDER BY 1;" ,
15171517 Expected : []sql.Row {
15181518 {1067629180 , 3120782595 , 1 , 0 , "t" , "f" , "t" , "f" , "f" , "f" , "t" , "f" , "t" , "t" , "f" , "{1}" , "{}" , "{}" , "0" , nil , nil },
15191519 {1322775662 , 3120782595 , 1 , 0 , "t" , "f" , "f" , "f" , "f" , "f" , "t" , "f" , "t" , "t" , "f" , "{2}" , "{}" , "{}" , "0" , nil , nil },
@@ -1530,18 +1530,18 @@ func TestPgIndex(t *testing.T) {
15301530 },
15311531 { // Different cases but non-quoted, so it works
15321532 Query : "SELECT i.indexrelid from pg_class c " +
1533- "JOIN PG_catalog.pg_INDEX i ON c.oid = i.indexrelid " +
1534- "JOIN pg_namespace n ON c.relnamespace = n.oid " +
1535- "WHERE n.nspname = 'testschema' and left(c.relname, 5) <> 'dolt_' " +
1536- "ORDER BY 1;" ,
1533+ "JOIN PG_catalog.pg_INDEX i ON c.oid = i.indexrelid " +
1534+ "JOIN pg_namespace n ON c.relnamespace = n.oid " +
1535+ "WHERE n.nspname = 'testschema' and left(c.relname, 5) <> 'dolt_' " +
1536+ "ORDER BY 1;" ,
15371537 Expected : []sql.Row {{1067629180 }, {1322775662 }, {3185790121 }},
15381538 },
15391539 {
15401540 Query : "SELECT i.indexrelid, i.indrelid, c.relname, t.relname FROM pg_catalog.pg_index i " +
1541- "JOIN pg_catalog.pg_class c ON i.indexrelid = c.oid " +
1542- "JOIN pg_catalog.pg_class t ON i.indrelid = t.oid " +
1543- "JOIN pg_namespace n ON t.relnamespace = n.oid " +
1544- "WHERE n.nspname = 'testschema' and left(c.relname, 5) <> 'dolt_'" ,
1541+ "JOIN pg_catalog.pg_class c ON i.indexrelid = c.oid " +
1542+ "JOIN pg_catalog.pg_class t ON i.indrelid = t.oid " +
1543+ "JOIN pg_namespace n ON t.relnamespace = n.oid " +
1544+ "WHERE n.nspname = 'testschema' and left(c.relname, 5) <> 'dolt_'" ,
15451545 Expected : []sql.Row {
15461546 {1067629180 , 3120782595 , "testing_pkey" , "testing" },
15471547 {1322775662 , 3120782595 , "v1" , "testing" },
0 commit comments