Re: Let psql process files with > 4,294,967,295 lines

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Let psql process files with > 4,294,967,295 lines
Date: 2006-07-30 21:30:40
Message-ID: 20060730213040.GB10074@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-07-30 21:40:16 Re: Let psql process files with > 4,294,967,295 lines
Previous Message David Fetter 2006-07-30 21:23:23 Let psql process files with > 4,294,967,295 lines