Re: BlockNumber fixes

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BlockNumber fixes
Date: 2002-07-16 17:54:29
Message-ID: 200207161754.g6GHsUs25483@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > The only other
> > unusual case I saw was tid outputing block number as %d and not %u. Is
> > that OK?
>
> Seems like it should use %u. The input side might be wrong too.
>

OK, fixed. Patch attached. There was also some confusion in the code
of how strtol returns its end pointer as always non-NULL:

test=> insert into x values ('(1,2)');
INSERT 16591 1
test=> insert into x values ('(1000000000,2)');
INSERT 16592 1
test=> insert into x values ('(3000000000,2)');
INSERT 16593 1
test=> select * from x;
y
----------------
(1,2)
(1000000000,2)
(3000000000,2)
(3 rows)

test=> insert into x values ('(5000000000,2)');
ERROR: tidin: invalid value.
test=> insert into x values ('(3000000000,200000)');
ERROR: tidin: invalid value.
test=> insert into x values ('(3000000000,20000)');
INSERT 16595 1

> > Also, pg_class.relpages is an int. We don't have unsigned int columns.
>
> Yeah. I had a todo item to look at all the uses of relpages and make
> sure they were being casted to unsigned ...

They all look OK to me.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Attachment Content-Type Size
unknown_filename text/plain 3.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-07-16 18:07:05 Re: Spec on pg_cast table/CREATE CAST command
Previous Message Peter Eisentraut 2002-07-16 17:33:43 Spec on pg_cast table/CREATE CAST command