From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: OID unsigned long long |
Date: | 2001-08-14 02:37:04 |
Message-ID: | 14639.997756624@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
mlw <markw(at)mohawksoft(dot)com> writes:
> Aside from adding %llu to all the %u everywhere an OID is used in a
> printf, and any other warnings, are there any other things I should be
> specially concerned about?
FE/BE protocol, a/k/a client/server interoperability. Flagging a
database so that a backend with the wrong OID size won't try to run in
it. Alignment --- on machines where long long has to be 8-byte aligned,
TOAST references as presently constituted will crash, because varlena
datatypes in general are only 4-byte aligned. There are more, but that
will do for starters.
BTW, I think #ifdef would be a totally unworkable way to attack the
format-string problem. The code clutter of #ifdef'ing everyplace that
presently uses %u would be a nightmare; the impact on
internationalization files would be worse. And don't forget that %llu
would be the right thing on only some machines; others like %qu, and
DEC Alphas think %lu is just fine. The only workable answer I can see
is for the individual messages to use some special code, maybe "%O" for
Oid. The problem is then (a) translating this to the right
platform-dependent thing, and (b) persuading gcc to somehow type-check
the elog calls anyway.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2001-08-14 05:01:30 | Re: Vague idea for allowing per-column locale |
Previous Message | Tim Allen | 2001-08-14 02:36:19 | Re: Vague idea for allowing per-column locale |