Re: [HACKERS] incompatible pointer types with newer zlib

2012-03-19 Thread Robert Haas
On Sat, Mar 17, 2012 at 3:58 AM, Peter Eisentraut pete...@gmx.net wrote: On tor, 2012-03-01 at 19:19 +0200, Peter Eisentraut wrote: I think the best fix would be to rearrange _PrintFileData() so that it doesn't use FH at all.  Instead, we could define a separate ArchiveHandle field IF that

Re: [HACKERS] incompatible pointer types with newer zlib

2012-03-19 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: maybe we should just rip out pg_backup_files/archFiles altogether. pg_dump is crufty enough without supporting undocumented and obsolete options for multiple decades. +1 regards, tom lane -- Sent via pgsql-hackers mailing

Re: [HACKERS] incompatible pointer types with newer zlib

2012-03-19 Thread Andrew Dunstan
On 03/19/2012 02:53 PM, Tom Lane wrote: Robert Haasrobertmh...@gmail.com writes: maybe we should just rip out pg_backup_files/archFiles altogether. pg_dump is crufty enough without supporting undocumented and obsolete options for multiple decades. +1 Yeah, go

Re: [HACKERS] incompatible pointer types with newer zlib

2012-03-17 Thread Peter Eisentraut
On tor, 2012-03-01 at 19:19 +0200, Peter Eisentraut wrote: I think the best fix would be to rearrange _PrintFileData() so that it doesn't use FH at all. Instead, we could define a separate ArchiveHandle field IF that works more like OF, and then change ahwrite() to use that. Here is a patch

Re: [HACKERS] incompatible pointer types with newer zlib

2012-03-01 Thread Peter Eisentraut
On fre, 2012-02-24 at 11:10 -0500, Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: On tor, 2012-02-23 at 10:17 -0500, Tom Lane wrote: void * seems entirely reasonable given the two different usages, but I would be happier if the patch added explicit casts whereever FH is set to

Re: [HACKERS] incompatible pointer types with newer zlib

2012-02-24 Thread Peter Eisentraut
On tor, 2012-02-23 at 10:17 -0500, Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: Fixing most of this is not difficult, see attached patch. The only ugliness is in pg_backup_archiver.h FILE *FH; /* General purpose file handle */ which is used throughout

Re: [HACKERS] incompatible pointer types with newer zlib

2012-02-24 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On tor, 2012-02-23 at 10:17 -0500, Tom Lane wrote: void * seems entirely reasonable given the two different usages, but I would be happier if the patch added explicit casts whereever FH is set to or used as one of these two types. That would add about

[HACKERS] incompatible pointer types with newer zlib

2012-02-23 Thread Peter Eisentraut
According to me update logs, somewhere between zlib versions 1.2.3.4 and 1.2.6, the definition of the gzFile type was changed from void * to struct gzFile_s *, an opaque struct. Note that gzFile is already the pointer in either case. Our code has assumed, however, that you use gzFile like FILE,

Re: [HACKERS] incompatible pointer types with newer zlib

2012-02-23 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: Fixing most of this is not difficult, see attached patch. The only ugliness is in pg_backup_archiver.h FILE *FH; /* General purpose file handle */ which is used throughout pg_dump as sometimes a real FILE* and sometimes a gzFile