Re: Improper use about DatumGetInt32 - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Improper use about DatumGetInt32
Date
Msg-id 5cba03cd-cff3-9f81-ba4f-4fd91e08bbce@enterprisedb.com
Whole thread Raw
In response to Re: Improper use about DatumGetInt32  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Responses Re: Improper use about DatumGetInt32  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
On 2020-11-02 16:59, Peter Eisentraut wrote:
> I have committed 0003.
> 
> For 0001, normal_rand(), I think you should reject negative arguments
> with an error.

I have committed a fix for that.

> For 0002, I think you should change the block number arguments to int8,
> same as other contrib modules do.

Looking further into this, almost all of pageinspect needs to be updated 
to handle block numbers larger than INT_MAX correctly.  Attached is a 
patch for this.  It is meant to work like other contrib modules, such as 
pg_freespace and pg_visibility.  I haven't tested this much yet.

Attachment

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Transaction isolation and table contraints
Next
From: Tom Lane
Date:
Subject: Re: Libpq support to connect to standby server as priority