*** oid2name.c.orig Wed Jan 17 17:12:05 2001 --- oid2name.c Wed Jan 17 17:27:11 2001 *************** *** 331,339 **** /* don't exclude the systables if this is set */ if(systables == 1) ! sprintf(todo, "select oid,relname from pg_class order by relname"); else ! sprintf(todo, "select oid,relname from pg_class where relname not like 'pg_%%' order by relname"); sql_exec(conn, todo, NULL); } --- 331,339 ---- /* don't exclude the systables if this is set */ if(systables == 1) ! sprintf(todo, "select relfilenode,relname from pg_class order by relname"); else ! sprintf(todo, "select relfilenode,relname from pg_class where relname not like 'pg_%%' order by relname"); sql_exec(conn, todo, NULL); } *************** *** 348,354 **** todo = (char *) malloc (1024); /* get the oid and tablename where the name matches tablename */ ! sprintf(todo, "select oid,relname from pg_class where relname = '%s'", tablename); returnvalue = sql_exec(conn, todo, 1); --- 348,354 ---- todo = (char *) malloc (1024); /* get the oid and tablename where the name matches tablename */ ! sprintf(todo, "select relfilenode,relname from pg_class where relname = '%s'", tablename); returnvalue = sql_exec(conn, todo, 1); *************** *** 372,378 **** todo = (char *) malloc (1024); ! sprintf(todo, "select oid,relname from pg_class where oid = %i", oid); returnvalue = sql_exec(conn, todo, 1); --- 372,378 ---- todo = (char *) malloc (1024); ! sprintf(todo, "select relfilenode,relname from pg_class where relfilenode = %i", oid); returnvalue = sql_exec(conn, todo, 1);