From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Philip Warner <pjw(at)rhyme(dot)com(dot)au> |
Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Giles Lean <giles(at)nemeton(dot)com(dot)au>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_dump and large files - is this a problem? |
Date: | 2002-10-22 13:29:22 |
Message-ID: | 17619.1035293362@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
> None, but it will be compatible with itself (the most we can hope for), and
> will work even if shifting is not supported for off_t (how likely is
> that?). I agree shift is definitely the way to go if it works on arbitrary
> data - ie. it does not rely on off_t being an integer. Can I shift a struct?
You can't. If there are any platforms where in fact off_t isn't an
arithmetic type, then shifting code would break there. I am not sure
there are any; can anyone provide a counterexample?
It would be simple enough to add a configure test to see whether off_t
is arithmetic (just try to compile "off_t x; x <<= 8;"). How about
#ifdef OFF_T_IS_ARITHMETIC_TYPE
// cross-platform compatible
use shifting method
#else
// not cross-platform compatible
read or write bytes of struct in storage order
#endif
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-10-22 13:48:58 | Re: Current CVS is broken |
Previous Message | Tom Lane | 2002-10-22 13:24:30 | Re: New SET/autocommit problem |