Re: pg_dump and large files - is this a problem?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: pg_dump and large files - is this a problem?
Дата
Msg-id 200210221626.g9MGQU402938@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: pg_dump and large files - is this a problem?  (Philip Warner <pjw@rhyme.com.au>)
Ответы Re: pg_dump and large files - is this a problem?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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@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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump and large files - is this a problem?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_dump and large files - is this a problem?