Thread
-
Re: pg_dump and large files - is this a problem?
Giles Lean <giles@nemeton.com.au> — 2002-10-24T02:54:50Z
> OK, does pre-1.6 NetBSD have fgetpos/fsetpos that is off_t/quad? Yes: int fgetpos(FILE *stream, fpos_t *pos); int fsetpos(FILE *stream, const fpos_t *pos); Per comments in <stdio.h> fpos_t is the same format as off_t, and off_t and fpos_t have been 64 bit since 1994. http://cvsweb.netbsd.org/bsdweb.cgi/basesrc/include/stdio.h Regards, Giles -
Re: pg_dump and large files - is this a problem?
Bruce Momjian <pgman@candle.pha.pa.us> — 2002-10-24T02:56:01Z
Looks like I have some more work to do. Thanks. --------------------------------------------------------------------------- Giles Lean wrote: > > > OK, does pre-1.6 NetBSD have fgetpos/fsetpos that is off_t/quad? > > Yes: > > int > fgetpos(FILE *stream, fpos_t *pos); > > int > fsetpos(FILE *stream, const fpos_t *pos); > > Per comments in <stdio.h> fpos_t is the same format as off_t, and > off_t and fpos_t have been 64 bit since 1994. > > http://cvsweb.netbsd.org/bsdweb.cgi/basesrc/include/stdio.h > > Regards, > > Giles > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > -- 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, Pennsylvania 19073
-
Re: pg_dump and large files - is this a problem?
Bruce Momjian <pgman@candle.pha.pa.us> — 2002-10-24T03:11:44Z
OK, NetBSD added. Any other OS's need this? Is it safe for me to code something that assumes fpos_t and off_t are identical? I can't think of a good way to test if two data types are identical. I don't think sizeof is enough. --------------------------------------------------------------------------- Giles Lean wrote: > > > OK, does pre-1.6 NetBSD have fgetpos/fsetpos that is off_t/quad? > > Yes: > > int > fgetpos(FILE *stream, fpos_t *pos); > > int > fsetpos(FILE *stream, const fpos_t *pos); > > Per comments in <stdio.h> fpos_t is the same format as off_t, and > off_t and fpos_t have been 64 bit since 1994. > > http://cvsweb.netbsd.org/bsdweb.cgi/basesrc/include/stdio.h > > Regards, > > Giles > > > > > -- 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, Pennsylvania 19073
-
Re: pg_dump and large files - is this a problem?
Peter Eisentraut <peter_e@gmx.net> — 2002-10-24T22:12:56Z
Bruce Momjian writes: > OK, NetBSD added. > > Any other OS's need this? Is it safe for me to code something that > assumes fpos_t and off_t are identical? I can't think of a good way to > test if two data types are identical. I don't think sizeof is enough. No, you can't assume that fpos_t and off_t are identical. But you can simulate a long fseeko() by calling fseek() multiple times, so it should be possible to write a replacement that works on all systems. -- Peter Eisentraut peter_e@gmx.net
-
Re: pg_dump and large files - is this a problem?
Bruce Momjian <pgman@candle.pha.pa.us> — 2002-10-24T23:43:00Z
Peter Eisentraut wrote: > Bruce Momjian writes: > > > OK, NetBSD added. > > > > Any other OS's need this? Is it safe for me to code something that > > assumes fpos_t and off_t are identical? I can't think of a good way to > > test if two data types are identical. I don't think sizeof is enough. > > No, you can't assume that fpos_t and off_t are identical. I was wondering --- if fpos_t and off_t are identical sizeof, and fpos_t can do shift << or >>, that means fpos_t is also integral like off_t. Can I then assume they are the same? > But you can simulate a long fseeko() by calling fseek() multiple times, so > it should be possible to write a replacement that works on all systems. Yes, but I can't simulate ftello, so I then can't do SEEK_CUR. and if I can't duplicate the entire API, I don't want to try. -- 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, Pennsylvania 19073