Re: [HACKERS] pgstatindex still throws ERROR: value 3220078592 is out of range for type integer

2010-06-09 Thread Dave Cramer
On Mon, Jun 7, 2010 at 8:30 PM, Takahiro Itagaki
itagaki.takah...@oss.ntt.co.jp wrote:

 Dave Cramer p...@fastcrypt.com wrote:

 I noted on line 169 that max_avail is still an int ? Where else would
 it be having problems ?

 It should not a problem because the local variable only stores byte
 size in a page. It will be at most only BLCKSZ (=8192).

 I wonder why you had ERROR: value ... is out of range for type integer
 message because we don't use any integer data types for sizes in
 pgstatindex. The error should have been thrown by SQL typin functions
 rather than C routines.

Takahiro,

Yes, this was the problem. I patched the C code but did not change the
functions.

Thanks,

Dave

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] pgstatindex still throws ERROR: value 3220078592 is out of range for type integer

2010-06-07 Thread Dave Cramer
I noted on line 169 that max_avail is still an int ? Where else would
it be having problems ?

Dave

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] pgstatindex still throws ERROR: value 3220078592 is out of range for type integer

2010-06-07 Thread Takahiro Itagaki

Dave Cramer p...@fastcrypt.com wrote:

 I noted on line 169 that max_avail is still an int ? Where else would
 it be having problems ?

It should not a problem because the local variable only stores byte
size in a page. It will be at most only BLCKSZ (=8192).

I wonder why you had ERROR: value ... is out of range for type integer
message because we don't use any integer data types for sizes in
pgstatindex. The error should have been thrown by SQL typin functions
rather than C routines.

CREATE OR REPLACE FUNCTION pgstatindex(IN relname text,
OUT version INT,
OUT tree_level INT,
OUT index_size BIGINT,
OUT root_block_no BIGINT,
OUT internal_pages BIGINT,
OUT leaf_pages BIGINT,
OUT empty_pages BIGINT,
OUT deleted_pages BIGINT,
OUT avg_leaf_density FLOAT8,
OUT leaf_fragmentation FLOAT8)
AS 'MODULE_PATHNAME', 'pgstatindex'
LANGUAGE C STRICT;

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers