Re: [HACKERS] Make more portable TAP tests of initdb

2015-05-02 Thread Noah Misch
On Fri, May 01, 2015 at 03:23:44PM +0900, Michael Paquier wrote: On Thu, Apr 30, 2015 at 12:17 PM, Noah Misch n...@leadboat.com wrote: As I pondered this, I felt it would do better to solve a different problem. The rm -rf invocations presumably crept in to reduce peak disk usage.

Re: [HACKERS] Make more portable TAP tests of initdb

2015-05-02 Thread Michael Paquier
On Sun, May 3, 2015 at 8:09 AM, Noah Misch n...@leadboat.com wrote: On Fri, May 01, 2015 at 03:23:44PM +0900, Michael Paquier wrote: On Thu, Apr 30, 2015 at 12:17 PM, Noah Misch n...@leadboat.com wrote: As I pondered this, I felt it would do better to solve a different problem. The rm -rf

Re: [HACKERS] Make more portable TAP tests of initdb

2015-05-01 Thread Michael Paquier
On Thu, Apr 30, 2015 at 12:17 PM, Noah Misch n...@leadboat.com wrote: On Wed, Apr 15, 2015 at 02:59:55PM +0900, Michael Paquier wrote: On Wed, Apr 15, 2015 at 2:38 PM, Noah Misch wrote: Solaris 10 ships Perl 5.8.4, and RHEL 5.11 ships Perl 5.8.8. Therefore, Perl installations lacking

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-29 Thread Noah Misch
On Wed, Apr 15, 2015 at 02:59:55PM +0900, Michael Paquier wrote: On Wed, Apr 15, 2015 at 2:38 PM, Noah Misch wrote: Solaris 10 ships Perl 5.8.4, and RHEL 5.11 ships Perl 5.8.8. Therefore, Perl installations lacking this File::Path feature will receive vendor support for years to

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-15 Thread Michael Paquier
On Wed, Apr 15, 2015 at 2:38 PM, Noah Misch wrote: Solaris 10 ships Perl 5.8.4, and RHEL 5.11 ships Perl 5.8.8. Therefore, Perl installations lacking this File::Path feature will receive vendor support for years to come. Replacing the use of keep_root with rmtree+mkdir will add 2-10 lines of

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-14 Thread David E. Wheeler
On Apr 14, 2015, at 9:05 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: http://perldoc.perl.org/File/Path.html With this formulation: remove_tree($tempdir, {keep_root = 1}); Does Perl 5.8 have this? Yes, it does. http://cpansearch.perl.org/src/NWCLARK/perl-5.8.9/lib/File/Path.pm

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-14 Thread Alvaro Herrera
Michael Paquier wrote: Hi all, I noticed that src/bin/initdb/t/001_initdb.pl uses directly rm via a system() call like that: system_or_bail rm -rf '$tempdir'/*; This way of doing is not portable, particularly on platforms that do not have rm like... Windows where the equivalent is del.

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-14 Thread Michael Paquier
On Wed, Apr 15, 2015 at 5:29 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: David E. Wheeler wrote: On Apr 14, 2015, at 1:21 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Castoroides has 5.8.4. Oops. WUT. Yeah, eh? Anyway I don't think it matters much: just don't enable TAP

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-14 Thread Noah Misch
On Tue, Apr 14, 2015 at 05:29:36PM -0300, Alvaro Herrera wrote: David E. Wheeler wrote: On Apr 14, 2015, at 1:21 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Castoroides has 5.8.4. Oops. WUT. Yeah, eh? Anyway I don't think it matters much: just don't enable TAP tests

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-14 Thread David Fetter
On Tue, Apr 14, 2015 at 09:25:33AM -0700, David E. Wheeler wrote: On Apr 14, 2015, at 9:05 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: http://perldoc.perl.org/File/Path.html With this formulation: remove_tree($tempdir, {keep_root = 1}); Does Perl 5.8 have this? Yes, it

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-14 Thread Alvaro Herrera
David E. Wheeler wrote: On Apr 14, 2015, at 9:05 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: http://perldoc.perl.org/File/Path.html With this formulation: remove_tree($tempdir, {keep_root = 1}); Does Perl 5.8 have this? Yes, it does.

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-14 Thread Alvaro Herrera
David E. Wheeler wrote: On Apr 14, 2015, at 1:21 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Castoroides has 5.8.4. Oops. WUT. Yeah, eh? Anyway I don't think it matters much: just don't enable TAP tests on machines with obsolete Perl. I think this is fine since 5.8's latest

Re: [HACKERS] Make more portable TAP tests of initdb

2015-04-14 Thread David E. Wheeler
On Apr 14, 2015, at 1:21 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Castoroides has 5.8.4. Oops. WUT. smime.p7s Description: S/MIME cryptographic signature

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-08-04 Thread Tsutomu Yamada
Robert Haas robertmh...@gmail.com wrote: On Fri, Jul 24, 2009 at 4:24 PM, Peter Eisentrautpete...@gmx.net wrote: On Friday 26 June 2009 12:07:24 Tsutomu Yamada wrote: Included is a conceptual patch to use intptr_t. Comments are welcome. After closer inspection, not having a win64 box

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-08-04 Thread Peter Eisentraut
On Tuesday 04 August 2009 14:03:34 Tsutomu Yamada wrote: Robert Haas robertmh...@gmail.com wrote: On Fri, Jul 24, 2009 at 4:24 PM, Peter Eisentrautpete...@gmx.net wrote: On Friday 26 June 2009 12:07:24 Tsutomu Yamada wrote: Included is a conceptual patch to use intptr_t. Comments are

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-08-04 Thread Magnus Hagander
On Tue, Aug 4, 2009 at 16:10, Peter Eisentrautpete...@gmx.net wrote: On Tuesday 04 August 2009 14:03:34 Tsutomu Yamada wrote: Robert Haas robertmh...@gmail.com wrote:   On Fri, Jul 24, 2009 at 4:24 PM, Peter Eisentrautpete...@gmx.net wrote:   On Friday 26 June 2009 12:07:24 Tsutomu Yamada

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-08-04 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Tue, Aug 4, 2009 at 16:10, Peter Eisentrautpete...@gmx.net wrote: Well, there is nothing outright wrong with this patch, but without any measurable effect, it is too early to commit it.  At least I would like to see the Datum typedef to be

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-08-04 Thread Peter Eisentraut
On Tuesday 04 August 2009 17:56:41 Tom Lane wrote: The other thing that I would say is a non-negotiable minimum requirement is that the patch include the necessary configure pushups so it does not break machines without uintptr_t. There is AC_TYPE_UINTPTR_T, so that should be easy. -- Sent

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-08-04 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On Tuesday 04 August 2009 17:56:41 Tom Lane wrote: The other thing that I would say is a non-negotiable minimum requirement is that the patch include the necessary configure pushups so it does not break machines without uintptr_t. There is

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-07-29 Thread Robert Haas
On Fri, Jul 24, 2009 at 4:24 PM, Peter Eisentrautpete...@gmx.net wrote: On Friday 26 June 2009 12:07:24 Tsutomu Yamada wrote: Included is a conceptual patch to use intptr_t. Comments are welcome. After closer inspection, not having a win64 box available, I have my doubts whether this patch

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-07-25 Thread Magnus Hagander
On Sat, Jul 25, 2009 at 02:24, Dave Pagedp...@pgadmin.org wrote: On Fri, Jul 24, 2009 at 10:53 PM, Stephen Frostsfr...@snowman.net wrote: Dave, * Dave Page (dp...@pgadmin.org) wrote: On Fri, Jul 24, 2009 at 10:35 PM, Stephen Frostsfr...@snowman.net wrote: Do you need access to a Win64 box?  

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-07-25 Thread Dave Page
On Sat, Jul 25, 2009 at 9:18 AM, Magnus Hagandermag...@hagander.net wrote: IIRC, there is no 64-bit support in VC++2005 Express.  There is a 64-bit compiler in the SDK though, that can probably be made to work with it. I think the official support for this (SDK compiler integrated with VC++

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-07-25 Thread Magnus Hagander
On Sat, Jul 25, 2009 at 10:35, Dave Pagedp...@pgadmin.org wrote: On Sat, Jul 25, 2009 at 9:18 AM, Magnus Hagandermag...@hagander.net wrote: IIRC, there is no 64-bit support in VC++2005 Express.  There is a 64-bit compiler in the SDK though, that can probably be made to work with it. I think

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-07-24 Thread Peter Eisentraut
On Friday 26 June 2009 12:07:24 Tsutomu Yamada wrote: Included is a conceptual patch to use intptr_t. Comments are welcome. After closer inspection, not having a win64 box available, I have my doubts whether this patch actually does anything. Foremost, it doesn't touch the definition of the

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-07-24 Thread Stephen Frost
Peter, * Peter Eisentraut (pete...@gmx.net) wrote: After closer inspection, not having a win64 box available, I have my doubts whether this patch actually does anything. Foremost, it doesn't touch the definition of the Datum type, which ought to be at the core of a change like this. Do

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-07-24 Thread Dave Page
On Fri, Jul 24, 2009 at 10:35 PM, Stephen Frostsfr...@snowman.net wrote: Peter, * Peter Eisentraut (pete...@gmx.net) wrote: After closer inspection, not having a win64 box available, I have my doubts whether this patch actually does anything.  Foremost, it doesn't touch the definition of the

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-07-24 Thread Stephen Frost
Dave, * Dave Page (dp...@pgadmin.org) wrote: On Fri, Jul 24, 2009 at 10:35 PM, Stephen Frostsfr...@snowman.net wrote: Do you need access to a Win64 box?  I can provide you access to a Win64 system, which Dave Page and Magnus already have access to, if it would be useful.. I haven't got

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-07-24 Thread Dave Page
On Fri, Jul 24, 2009 at 10:53 PM, Stephen Frostsfr...@snowman.net wrote: Dave, * Dave Page (dp...@pgadmin.org) wrote: On Fri, Jul 24, 2009 at 10:35 PM, Stephen Frostsfr...@snowman.net wrote: Do you need access to a Win64 box?  I can provide you access to a Win64 system, which Dave Page and

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-06-29 Thread Tsutomu Yamada
Peter Eisentraut pete...@gmx.net wrote: On Friday 26 June 2009 12:07:24 Tsutomu Yamada wrote: Proposal: More portable way to support 64bit platforms Short description: Current PostgreSQL implementation has some portability issues to support 64bit platforms: pointer calculations

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-06-29 Thread Tom Lane
Tsutomu Yamada tsut...@sraoss.co.jp writes: Yes, I have read through the discusion but it seems somewhat faded out. This is because no platform other than Windows has 64bit pointer issues IMO. I think using intptr_t is cleaner and will bring more portability. Moreover it will solve Windows

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-06-29 Thread Peter Eisentraut
On Monday 29 June 2009 17:20:09 Tom Lane wrote: The problem with this is that it's barely the tip of the iceberg. One point I recall is that there are lots of places where %lu is assumed to be the correct format to print Datums with. Hmm. I tried this out. typedef Datum to be long long int

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-06-29 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On Monday 29 June 2009 17:20:09 Tom Lane wrote: If it were actually possible to support Win64 with only a couple of dozen lines of changes, we would have done it long since. Possibly, or everyone was too confused and didn't know where to start. Well,

Re: [HACKERS] Proposal: More portable way to support 64bit platforms

2009-06-26 Thread Peter Eisentraut
On Friday 26 June 2009 12:07:24 Tsutomu Yamada wrote: Proposal: More portable way to support 64bit platforms Short description: Current PostgreSQL implementation has some portability issues to support 64bit platforms: pointer calculations using long is not portable, for example on Windows

Re: [HACKERS] Is this portable?

2007-04-02 Thread Bruce Momjian
Alvaro Herrera wrote: Can I declare a struct in a function's declaration section? Something like this: static void foobar(void) { struct foo { Oid foo; int bar; }; struct foo baz; baz.foo = InvalidOid;

Re: [HACKERS] Is this portable?

2007-04-02 Thread Zdenek Kotala
Alvaro Herrera wrote: Can I declare a struct in a function's declaration section? Something like this: static void foobar(void) { struct foo { Oid foo; int bar; }; struct foo baz; baz.foo = InvalidOid;

Re: [HACKERS] Is this portable?

2007-04-02 Thread Tom Lane
Zdenek Kotala [EMAIL PROTECTED] writes: Alvaro Herrera wrote: Can I declare a struct in a function's declaration section? It works fine with Sun Studio 11. AFAICT it's required by the original KR C book. regards, tom lane ---(end of

Re: [HACKERS] Is this portable?

2007-04-02 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: Zdenek Kotala [EMAIL PROTECTED] writes: Alvaro Herrera wrote: Can I declare a struct in a function's declaration section? It works fine with Sun Studio 11. AFAICT it's required by the original KR C book. IIRC there's something odd about the scope of the

Re: [HACKERS] Is this portable?

2007-04-02 Thread Alvaro Herrera
Gregory Stark wrote: Tom Lane [EMAIL PROTECTED] writes: Zdenek Kotala [EMAIL PROTECTED] writes: Alvaro Herrera wrote: Can I declare a struct in a function's declaration section? It works fine with Sun Studio 11. AFAICT it's required by the original KR C book. IIRC there's

Re: [HACKERS] Is this portable?

2007-04-02 Thread Tom Lane
Gregory Stark [EMAIL PROTECTED] writes: IIRC there's something odd about the scope of the declared struct label. Something like it previously extended to the end of the file but post-ANSI was limited to the scope it's declared in (including very limited scopes where it would be useless such