Re: pg_autovacuum patch for 7.4.2 and HEAD
От | Matthew T. O'Connor |
---|---|
Тема | Re: pg_autovacuum patch for 7.4.2 and HEAD |
Дата | |
Msg-id | 40533BBA.1050509@zeut.net обсуждение исходный текст |
Ответ на | Re: pg_autovacuum patch for 7.4.2 and HEAD (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: pg_autovacuum patch for 7.4.2 and HEAD
Re: pg_autovacuum patch for 7.4.2 and HEAD |
Список | pgsql-patches |
Tom Lane wrote: >"Matthew T. O'Connor" <matthew@zeut.net> writes: > > >>! new_tbl->relid = atol(PQgetvalue(res, row, PQfnumber(res, "oid"))); >>! new_tbl->reltuples = atof(PQgetvalue(res, row, PQfnumber(res, "reltuples"))); >>! new_tbl->relpages = atol(PQgetvalue(res, row, PQfnumber(res, "relpages"))); >> >> > >This ignores the fact that relid and relpages are unsigned. I would >suggest adopting the same convention for OID as is used in pg_dump and >other places: > >#define atooid(x) ((Oid) strtoul((x), NULL, 10)) > >You could actually use this same macro for reading relpages, but that's >probably abusing the notation. I'd use strtoul directly for relpages, >I think. > > > >>! init_dbinfo(char *dbname, int oid, int age) >>... >>! init_dbinfo(char *dbname, uint oid, uint age) >> >> > >This (and other declarations) should be "Oid oid". > > > Thanks for the help / review. Here is my 2nd cut at fixing this. I believe I have addressed the above concernes. Please review again and (hopefully) apply. Matthew
В списке pgsql-patches по дате отправления: