diff options
Diffstat (limited to 'contrib/findoidjoins/findoidjoins.c')
-rw-r--r-- | contrib/findoidjoins/findoidjoins.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/findoidjoins/findoidjoins.c b/contrib/findoidjoins/findoidjoins.c index c559b7a3625..c426b5523a3 100644 --- a/contrib/findoidjoins/findoidjoins.c +++ b/contrib/findoidjoins/findoidjoins.c @@ -39,7 +39,9 @@ main(int argc, char **argv) WHERE a.attnum > 0 AND \ relkind = 'r' AND \ (typname = 'oid' OR \ - typname = 'regproc') AND \ + typname = 'regproc' OR \ + typname = 'regclass' OR \ + typname = 'regtype') AND \ a.attrelid = c.oid AND \ a.atttypid = t.oid \ ORDER BY 2, a.attnum ; \ @@ -77,7 +79,7 @@ main(int argc, char **argv) DECLARE c_matches BINARY CURSOR FOR \ SELECT count(*)::int4 \ FROM \"%s\" t1, \"%s\" t2 \ - WHERE RegprocToOid(t1.\"%s\") = t2.oid ", + WHERE t1.\"%s\"::oid = t2.oid ", relname, relname2, attname); doquery(query); |