@@ -3516,14 +3516,13 @@ getTables(int *numTables)
3516
3516
* owning column, if any (note this dependency is AUTO as of 8.2)
3517
3517
*/
3518
3518
appendPQExpBuffer (query ,
3519
- "SELECT c.tableoid, c.oid, relname, "
3520
- "relacl, relkind, relnamespace, "
3521
- "(%s relowner) AS rolname, "
3522
- "relchecks, (reltriggers <> 0) AS relhastriggers, "
3523
- "relhasindex, relhasrules, relhasoids, "
3524
- "relfrozenxid, "
3525
- "0 AS toid, "
3526
- "0 AS tfrozenxid, "
3519
+ "SELECT c.tableoid, c.oid, c.relname, "
3520
+ "c.relacl, c.relkind, c.relnamespace, "
3521
+ "(%s c.relowner) AS rolname, "
3522
+ "c.relchecks, (c.reltriggers <> 0) AS relhastriggers, "
3523
+ "c.relhasindex, c.relhasrules, c.relhasoids, "
3524
+ "c.relfrozenxid, tc.oid AS toid, "
3525
+ "tc.relfrozenxid AS tfrozenxid, "
3527
3526
"NULL AS reloftype, "
3528
3527
"d.refobjid AS owning_tab, "
3529
3528
"d.refobjsubid AS owning_col, "
@@ -3536,7 +3535,8 @@ getTables(int *numTables)
3536
3535
"d.classid = c.tableoid AND d.objid = c.oid AND "
3537
3536
"d.objsubid = 0 AND "
3538
3537
"d.refclassid = c.tableoid AND d.deptype = 'a') "
3539
- "WHERE relkind in ('%c', '%c', '%c', '%c') "
3538
+ "LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) "
3539
+ "WHERE c.relkind in ('%c', '%c', '%c', '%c') "
3540
3540
"ORDER BY c.oid" ,
3541
3541
username_subquery ,
3542
3542
RELKIND_SEQUENCE ,
0 commit comments