for (tupnum = 0; tupnum < ntups; tupnum++)
{
- dbinfos[tupnum].db_oid = str2uint(PQgetvalue(res, tupnum, i_oid));
+ dbinfos[tupnum].db_oid = atooid(PQgetvalue(res, tupnum, i_oid));
snprintf(dbinfos[tupnum].db_name, sizeof(dbinfos[tupnum].db_name), "%s",
PQgetvalue(res, tupnum, i_datname));
RelInfo *curr = &relinfos[num_rels++];
const char *tblspace;
- curr->reloid = str2uint(PQgetvalue(res, relnum, i_oid));
+ curr->reloid = atooid(PQgetvalue(res, relnum, i_oid));
nspname = PQgetvalue(res, relnum, i_nspname);
strlcpy(curr->nspname, nspname, sizeof(curr->nspname));
relname = PQgetvalue(res, relnum, i_relname);
strlcpy(curr->relname, relname, sizeof(curr->relname));
- curr->relfilenode = str2uint(PQgetvalue(res, relnum, i_relfilenode));
- curr->toastrelid = str2uint(PQgetvalue(res, relnum, i_reltoastrelid));
+ curr->relfilenode = atooid(PQgetvalue(res, relnum, i_relfilenode));
+ curr->toastrelid = atooid(PQgetvalue(res, relnum, i_reltoastrelid));
tblspace = PQgetvalue(res, relnum, i_spclocation);
/* if no table tablespace, use the database tablespace */
i_relfile = PQfnumber(res, "relfilenode");
if (whichCluster == CLUSTER_OLD)
- ctx->old.pg_database_oid = str2uint(PQgetvalue(res, 0, i_relfile));
+ ctx->old.pg_database_oid = atooid(PQgetvalue(res, 0, i_relfile));
else
- ctx->new.pg_database_oid = str2uint(PQgetvalue(res, 0, i_relfile));
+ ctx->new.pg_database_oid = atooid(PQgetvalue(res, 0, i_relfile));
PQclear(res);
PQfinish(conn);