From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Philip Warner <pjw(at)rhyme(dot)com(dot)au> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(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 16:26:30 |
Message-ID: | 200210221626.g9MGQU402938@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Philip Warner wrote:
> At 12:00 PM 22/10/2002 -0400, Bruce Momjian wrote:
> >It does have the advantage of being more portable on systems
> >that do have integral off_t
>
> I suspect it is no more portable than determining storage order by using
> 'int i = 256', then writing in storage order, and has the disadvantage that
> it may break as discussed.
>
> AFAICT, using storage order will not break under any circumstances within
> one OS/architecture (unlike using shift), and will not break any more often
> than using shift in cases where off_t is integral.
Your version will break more often because we are assuming we can
determine the endian-ness of the OS, _and_ for quad off_t types,
assuming we know that is stored the same too. While we have ending for
int's, I have no idea if quads are always stored the same. By accessing
it as an integral type, we make certain it is output the same way every
time for every OS.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Igor Georgiev | 2002-10-22 16:34:57 | Re: Security question : Database access control |
Previous Message | Tom Lane | 2002-10-22 16:22:57 | Re: pg_dump and large files - is this a problem? |