| From: | Bruce Momjian <bruce(at)momjian(dot)us> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | pgsql-committers(at)postgresql(dot)org | 
| Subject: | Re: pgsql: In pg_upgrade, properly handle oids > 2^31 by using strtoul() in | 
| Date: | 2010-09-28 22:14:23 | 
| Message-ID: | 201009282214.o8SMENO25830@momjian.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-committers | 
Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > In pg_upgrade, properly handle oids > 2^31 by using strtoul() internally
> > rather than atol().
> 
> It would be a lot better if this code adhered to the project-standard
> coding convention of defining and using an atooid() macro for the
> purpose of converting text representations of OIDs to bits.
OK, I used your idea for conversion directly to oid from the system
catalogs, patch attached.  All the pg_controldata returned integers are
defined as uint32 in pg_upgrade. Should I use atooid() for some of them
and define some of them as OID?  I thought that might just add more
confusion.  On a quick look, it seems only chkpnt_nxtoid is an oid, but
I am not sure.
-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com
  + It's impossible for everything to be true. +
| Attachment | Content-Type | Size | 
|---|---|---|
| /rtmp/diff | text/x-diff | 2.6 KB | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2010-09-28 22:37:13 | Re: pgsql: In pg_upgrade, properly handle oids > 2^31 by using strtoul() in | 
| Previous Message | Bruce Momjian | 2010-09-28 22:11:43 | pgsql: Use macro atooid() for conversion of strings to oids, per sugges |