| From: | David Fetter <david(at)fetter(dot)org> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Let psql process files with > 4,294,967,295 lines |
| Date: | 2006-07-31 02:37:51 |
| Message-ID: | 20060731023751.GY2654@fetter.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sun, Jul 30, 2006 at 05:40:16PM -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > David Fetter wrote:
> >> 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.
>
> And the datatype should be declared int64, not "long long" which
> doesn't exist everywhere.
>
> Actually you probably want uint64 and UINT64_FORMAT...
>
> regards, tom lane
I think this fixes it, but I'm unsure how to test it. Two of the
methods mentioned in IRC, attaching with gdb and setting to a value >
2^32, and setting it directly in some code, seem like OK approaches.
Cheers,
D
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter
Remember to vote!
| Attachment | Content-Type | Size |
|---|---|---|
| psql_long_file.diff | text/plain | 2.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | ITAGAKI Takahiro | 2006-07-31 02:47:08 | LWLock statistics collector |
| Previous Message | Tom Lane | 2006-07-31 01:24:47 | Re: 64-bit integers for GUC |