Re: Large file support available - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Large file support available
Date
Msg-id 200208271832.g7RIW3a28322@candle.pha.pa.us
Whole thread Raw
In response to Re: Large file support available  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut wrote:
> Bruce Momjian writes:
> 
> > My point is that it seems fsetpos is the approved way of accessing large
> > files, rather than fseeko.  In fact, I don't have fseeko here but I do
> > have fsetpos, and it does handle large files because my includes have
> > this:
> >
> >     typedef off_t fpos_t
> >     typedef quad_t off_t;
> 
> Interesting.  In general, you can't rely on fpos_t being an integral type,
> which indeed on my machine it isn't.  But for pg_dump we need an integral
> type because we do offset arithmetic.

Oh, is that why fsetpos is always SEEK_SET and not SET_CURR or offset
stuff.  Strange I don't have fseeko and do have large file support. 
BSD/OS has had it for years.  I guess they just do off_t arithmetic, but
that isn't portable.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Large file support available
Next
From: Bruce Momjian
Date:
Subject: Re: [BUGS] Bug #718: request for improvement of /? to show /d+ /l+