pgsql/src/backend/utils/adt (oid.c)
pgsql/src/backend/utils/adt (oid.c)
От:
tgl@postgresql.org
Дата:
Date: Monday, November 20, 2000 @ 22:23:19
Author: tgl
Update of /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/adt
from hub.org:/home/projects/pgsql/tmp/cvs-serv86997/src/backend/utils/adt
Modified Files:
oid.c
----------------------------- Log Message -----------------------------
Make oidin/oidout produce and consume unsigned representation of Oid,
rather than just being aliases for int4in/int4out. Give type Oid a
full set of comparison operators that do proper unsigned comparison,
instead of reusing the int4 comparators. Since pg_dump is now doing
unsigned comparisons of OIDs, it is now *necessary* that we play by
the rules here. In fact, given that btoidcmp() has been doing unsigned
comparison for quite some time, it seems likely that we have index-
corruption problems in 7.0 and before once the Oid counter goes past
2G. Fixing these operators is a necessary step before we can think
about 8-byte Oid, too.
Re: pgsql/src/backend/utils/adt (oid.c)
От:
Larry Rosenman <ler@lerctr.org>
Дата:
Missing an #include of : cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o numeric.o numeric.c UX:acomp: WARNING: "numeric.c", line 1953: end-of-loop code not reached UX:acomp: WARNING: "numeric.c", line 1991: end-of-loop code not reached UX:acomp: WARNING: "numeric.c", line 2058: end-of-loop code not reached UX:acomp: WARNING: "numeric.c", line 2118: end-of-loop code not reached UX:acomp: WARNING: "numeric.c", line 2147: end-of-loop code not reached UX:acomp: WARNING: "numeric.c", line 2176: end-of-loop code not reached cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o numutils.o numutils.c cc -O -K inline -I/usr/local/include -I../../../../src/include -c -o oid.o oid.c UX:acomp: ERROR: "oid.c", line 98: undefined symbol: errno UX:acomp: ERROR: "oid.c", line 108: undefined symbol: EINVAL gmake[4]: *** [oid.o] Error 1 gmake[4]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils/adt' gmake[3]: *** [adt-recursive] Error 2 gmake[3]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend/utils' gmake[2]: *** [utils-recursive] Error 2 gmake[2]: Leaving directory `/home/ler/pg-dev/pgsql/src/backend' gmake[1]: *** [all] Error 2 gmake[1]: Leaving directory `/home/ler/pg-dev/pgsql/src' gmake: *** [all] Error 2 * tgl@postgresql.org [001120 21:26]: > Date: Monday, November 20, 2000 @ 22:23:19 > Author: tgl > > Update of /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/adt > from hub.org:/home/projects/pgsql/tmp/cvs-serv86997/src/backend/utils/adt > > Modified Files: > oid.c > > ----------------------------- Log Message ----------------------------- > > Make oidin/oidout produce and consume unsigned representation of Oid, > rather than just being aliases for int4in/int4out. Give type Oid a > full set of comparison operators that do proper unsigned comparison, > instead of reusing the int4 comparators. Since pg_dump is now doing > unsigned comparisons of OIDs, it is now *necessary* that we play by > the rules here. In fact, given that btoidcmp() has been doing unsigned > comparison for quite some time, it seems likely that we have index- > corruption problems in 7.0 and before once the Oid counter goes past > 2G. Fixing these operators is a necessary step before we can think > about 8-byte Oid, too. -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 (voice) Internet: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
Re: [HACKERS] Re: pgsql/src/backend/utils/adt (oid.c)
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Larry Rosenman writes: > Missing an #include of : Ooops, sorry about that --- gets included by some other standard header on my system, so I tend to miss that omission :-( Will fix shortly. regards, tom lane
Re: pgsql/src/backend/utils/adt (oid.c)
От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
Can I assume this TODO item is now done? * Make oid use unsigned int more reliably, pg_atoi() > Date: Monday, November 20, 2000 @ 22:23:19 > Author: tgl > > Update of /home/projects/pgsql/cvsroot/pgsql/src/backend/utils/adt > from hub.org:/home/projects/pgsql/tmp/cvs-serv86997/src/backend/utils/adt > > Modified Files: > oid.c > > ----------------------------- Log Message ----------------------------- > > Make oidin/oidout produce and consume unsigned representation of Oid, > rather than just being aliases for int4in/int4out. Give type Oid a > full set of comparison operators that do proper unsigned comparison, > instead of reusing the int4 comparators. Since pg_dump is now doing > unsigned comparisons of OIDs, it is now *necessary* that we play by > the rules here. In fact, given that btoidcmp() has been doing unsigned > comparison for quite some time, it seems likely that we have index- > corruption problems in 7.0 and before once the Oid counter goes past > 2G. Fixing these operators is a necessary step before we can think > about 8-byte Oid, too. > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Re: pgsql/src/backend/utils/adt (oid.c)
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Bruce Momjian writes: > Can I assume this TODO item is now done? > * Make oid use unsigned int more reliably, pg_atoi() No. I cleaned up the LO-related contrib modules today, but I wouldn't care to assert that OID is now handled correctly everywhere :-( regards, tom lane