1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00
This commit is contained in:
Bruce Momjian
2001-01-24 03:40:33 +00:00
parent 2c591cb821
commit a939e97451
3 changed files with 9 additions and 8 deletions

View File

@ -2,7 +2,7 @@
#
subdir = contrib/oid2name
top_builddir = /pgtop/
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
override CPPFLAGS += -I$(libpq_srcdir)

View File

@ -331,9 +331,9 @@ void sql_exec_dumptable(PGconn *conn, int systables)
/* don't exclude the systables if this is set */
if(systables == 1)
sprintf(todo, "select oid,relname from pg_class order by relname");
sprintf(todo, "select relfilenode,relname from pg_class order by relname");
else
sprintf(todo, "select oid,relname from pg_class where relname not like 'pg_%%' order by relname");
sprintf(todo, "select relfilenode,relname from pg_class where relname not like 'pg_%%' order by relname");
sql_exec(conn, todo, NULL);
}
@ -348,7 +348,7 @@ void sql_exec_searchtable(PGconn *conn, char *tablename)
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);
sprintf(todo, "select relfilenode,relname from pg_class where relname = '%s'", tablename);
returnvalue = sql_exec(conn, todo, 1);
@ -372,7 +372,7 @@ void sql_exec_searchoid(PGconn *conn, int oid)
todo = (char *) malloc (1024);
sprintf(todo, "select oid,relname from pg_class where oid = %i", oid);
sprintf(todo, "select relfilenode,relname from pg_class where oid = %i", oid);
returnvalue = sql_exec(conn, todo, 1);