Re: Let psql process files with > 4,294,967,295 lines - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Let psql process files with > 4,294,967,295 lines
Date
Msg-id 20060730213040.GB10074@surnet.cl
Whole thread Raw
In response to Let psql process files with > 4,294,967,295 lines  (David Fetter <david@fetter.org>)
Responses Re: Let psql process files with > 4,294,967,295 lines  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
David Fetter wrote:

Hi,

> I just ran across an issue where in psql, people can get the line
> number in the file so long as it is under 2^32-1 lines long, but once
> it gets larger than that, it's hosed.
> 
> This patch changes the data type from unsigned int to unsigned long
> long, which is probably not the correct thing in order to get 64-bit
> arithmetic, but I figure it's good enough to get a discussion started.

The only thing I can tell you is that you should use INT64_FORMAT
instead of %lld.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Let psql process files with > 4,294,967,295 lines
Next
From: Tom Lane
Date:
Subject: Re: Let psql process files with > 4,294,967,295 lines