1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

findoidjoins was suffering from bit rot (pginterface no

longer in expected location).
This commit is contained in:
Tom Lane
2000-01-22 23:05:14 +00:00
parent fa5400c0a4
commit 78845177bb
3 changed files with 26 additions and 19 deletions

View File

@ -1,13 +1,14 @@
/*
* findoidjoins.c, required pgsql/contrib/pginterface
* findoidjoins.c, requires src/interfaces/libpgeasy
*
*/
#include <stdio.h>
#include <string.h>
#include "libpq-fe.h"
#include "halt.h"
#include <libpq-fe.h>
#include "pginterface.h"
#include "libpgeasy.h"
PGresult *attres,
*relres;
@ -69,14 +70,14 @@ main(int argc, char **argv)
sprintf(query, "\
DECLARE c_matches BINARY CURSOR FOR \
SELECT count(*) \
FROM % s t1, %s t2 \
WHERE t1.% s = t2.oid ", relname, relname2, attname);
FROM %s t1, %s t2 \
WHERE t1.%s = t2.oid ", relname, relname2, attname);
else
sprintf(query, "\
DECLARE c_matches BINARY CURSOR FOR \
SELECT count(*) \
FROM % s t1, %s t2 \
WHERE RegprocToOid(t1.% s) = t2.oid ", relname, relname2, attname);
FROM %s t1, %s t2 \
WHERE RegprocToOid(t1.%s) = t2.oid ", relname, relname2, attname);
doquery(query);
doquery("FETCH ALL IN c_matches");