Re: [HACKERS] Warning compiling pg_dump (MinGW, Windows XP)

2011-01-18 Thread Pavel Golub
Hello, Andrew.

You wrote:



AD On 01/17/2011 03:51 PM, Tom Lane wrote:
 Andrew Dunstanand...@dunslane.net  writes:
 On 01/17/2011 07:18 AM, Pavel Golub wrote:
 So you think I should just ignore these warnings? Because I can't
 remember the same behaviour on 8.x branches...
 We've had them all along, as I said. See
 http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=frogmouthdt=2011-01-04%2023%3A54%3A16stg=make
 for the same thing in an 8.2 build.
 I wonder why mingw's gcc is complaining about %m when other versions of
 gcc do not?  If you can't get it to shut up about that, there's not
 going to be much percentage in silencing warnings about %lld.

   

AD We could add -Wno-format to the flags. That makes it shut up, but maybe
AD we don't want to use such a sledgehammer.

I want to understand the only thing. Are these warnings really
dangerous? Or I should just ignore them?

AD cheers

AD andrew



-- 
With best wishes,
 Pavel  mailto:pa...@gf.microolap.com


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Warning compiling pg_dump (MinGW, Windows XP)

2011-01-18 Thread Andrew Dunstan



On 01/18/2011 04:40 AM, Pavel Golub wrote:


AD  We could add -Wno-format to the flags. That makes it shut up, but maybe
AD  we don't want to use such a sledgehammer.

I want to understand the only thing. Are these warnings really
dangerous? Or I should just ignore them?





As I pointed out previously, we have had these warnings for years and 
years. I am not aware of a single issue that has been reported as 
arising from them.


cheers

andrew

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Warning compiling pg_dump (MinGW, Windows XP)

2011-01-17 Thread Pavel Golub
Hello, Robert.

You wrote:

RH 2011/1/13 Pavel Golub pa...@microolap.com:
 Hello, Pgsql-hackers.

 I'm getting such warnings:

 pg_dump.c: In function 'dumpSequence':
 pg_dump.c:11449:2: warning: unknown conversion type character 'l' in format
 pg_dump.c:11449:2: warning: too many arguments for format
 pg_dump.c:11450:2: warning: unknown conversion type character 'l' in format
 pg_dump.c:11450:2: warning: too many arguments for format

 Line numbers my not be the same in the official sources, because I've
 made some changes. But the lines are:

        snprintf(bufm, sizeof(bufm), INT64_FORMAT, SEQ_MINVALUE);
        snprintf(bufx, sizeof(bufx), INT64_FORMAT, SEQ_MAXVALUE);

 In my oppinion configure failed for MinGw+Windows in this case. Am I
 right? Can someone give me a hint how to avoid this?

RH It seems like PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT is getting the
RH wrong answer on your machine, though I'm not sure why.  The easiest
RH workaround is probably to run configure and then edit
RH src/include/pg_config.h before compiling.

Thanks Robert. What value should I enter for this option?




-- 
With best wishes,
 Pavel  mailto:pa...@gf.microolap.com


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Warning compiling pg_dump (MinGW, Windows XP)

2011-01-17 Thread Andrew Dunstan



On 01/17/2011 05:54 AM, Pavel Golub wrote:

Hello, Robert.

You wrote:

RH  2011/1/13 Pavel Golubpa...@microolap.com:

Hello, Pgsql-hackers.

I'm getting such warnings:

pg_dump.c: In function 'dumpSequence':
pg_dump.c:11449:2: warning: unknown conversion type character 'l' in format
pg_dump.c:11449:2: warning: too many arguments for format
pg_dump.c:11450:2: warning: unknown conversion type character 'l' in format
pg_dump.c:11450:2: warning: too many arguments for format

Line numbers my not be the same in the official sources, because I've
made some changes. But the lines are:

snprintf(bufm, sizeof(bufm), INT64_FORMAT, SEQ_MINVALUE);
snprintf(bufx, sizeof(bufx), INT64_FORMAT, SEQ_MAXVALUE);

In my oppinion configure failed for MinGw+Windows in this case. Am I
right? Can someone give me a hint how to avoid this?

RH  It seems like PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT is getting the
RH  wrong answer on your machine, though I'm not sure why.  The easiest
RH  workaround is probably to run configure and then edit
RH  src/include/pg_config.h before compiling.

Thanks Robert. What value should I enter for this option?




Mingw has always had a huge number of format warnings. See for example 
http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=frogmouthdt=2011-01-17%2007%3A30%3A00stg=make


If someone wants to fix them that would be good, but I'm not sure it's a 
simple task. There's probably some discussion of it in the archives back 
when we first did the Windows port.


cheers

andrew

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Warning compiling pg_dump (MinGW, Windows XP)

2011-01-17 Thread Pavel Golub
Hello, Andrew.

You wrote:



AD On 01/17/2011 05:54 AM, Pavel Golub wrote:
 Hello, Robert.

 You wrote:

 RH  2011/1/13 Pavel Golubpa...@microolap.com:
 Hello, Pgsql-hackers.

 I'm getting such warnings:

 pg_dump.c: In function 'dumpSequence':
 pg_dump.c:11449:2: warning: unknown conversion type character 'l' in format
 pg_dump.c:11449:2: warning: too many arguments for format
 pg_dump.c:11450:2: warning: unknown conversion type character 'l' in format
 pg_dump.c:11450:2: warning: too many arguments for format

 Line numbers my not be the same in the official sources, because I've
 made some changes. But the lines are:

 snprintf(bufm, sizeof(bufm), INT64_FORMAT, SEQ_MINVALUE);
 snprintf(bufx, sizeof(bufx), INT64_FORMAT, SEQ_MAXVALUE);

 In my oppinion configure failed for MinGw+Windows in this case. Am I
 right? Can someone give me a hint how to avoid this?
 RH  It seems like PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT is getting the
 RH  wrong answer on your machine, though I'm not sure why.  The easiest
 RH  workaround is probably to run configure and then edit
 RH  src/include/pg_config.h before compiling.

 Thanks Robert. What value should I enter for this option?



AD Mingw has always had a huge number of format warnings. See for example
AD 
http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=frogmouthdt=2011-01-17%2007%3A30%3A00stg=make

So you think I should just ignore these warnings? Because I can't
remember the same behaviour on 8.x branches...

AD If someone wants to fix them that would be good, but I'm not sure it's a
AD simple task. There's probably some discussion of it in the archives back
AD when we first did the Windows port.

AD cheers

AD andrew



-- 
With best wishes,
 Pavel  mailto:pa...@gf.microolap.com


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Warning compiling pg_dump (MinGW, Windows XP)

2011-01-17 Thread Robert Haas
On Mon, Jan 17, 2011 at 5:54 AM, Pavel Golub pa...@microolap.com wrote:
 RH It seems like PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT is getting the
 RH wrong answer on your machine, though I'm not sure why.  The easiest
 RH workaround is probably to run configure and then edit
 RH src/include/pg_config.h before compiling.

 Thanks Robert. What value should I enter for this option?

Not sure.  I notice that the configure test has this comment:

# PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT
# ---
# Determine which format snprintf uses for long long int.  We handle
# %lld, %qd, %I64d.  The result is in shell variable
# LONG_LONG_INT_FORMAT.
#
# MinGW uses '%I64d', though gcc throws an warning with -Wall,
# while '%lld' doesn't generate a warning, but doesn't work.
#

...and the values the test actually tries are:

%lld
%qd
%I64d

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Warning compiling pg_dump (MinGW, Windows XP)

2011-01-17 Thread Andrew Dunstan



On 01/17/2011 07:18 AM, Pavel Golub wrote:


AD  Mingw has always had a huge number of format warnings. See for example
AD  
http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=frogmouthdt=2011-01-17%2007%3A30%3A00stg=make

So you think I should just ignore these warnings? Because I can't
remember the same behaviour on 8.x branches...




We've had them all along, as I said. See 
http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=frogmouthdt=2011-01-04%2023%3A54%3A16stg=make 
for the same thing in an 8.2 build.


cheers

andre

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Warning compiling pg_dump (MinGW, Windows XP)

2011-01-17 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes:
 2011/1/13 Pavel Golub pa...@microolap.com:
 pg_dump.c: In function 'dumpSequence':
 pg_dump.c:11449:2: warning: unknown conversion type character 'l' in format
 pg_dump.c:11449:2: warning: too many arguments for format

 It seems like PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT is getting the
 wrong answer on your machine, though I'm not sure why.

That configure check tests whether snprintf produces the right result at
runtime.  It doesn't check whether the compiler will generate a warning
about it.  It looks to me like Pavel has a compiler that is out of sync
with his libc; which is a platform configuration mistake that he needs
to fix.

Another possibility is that configure chose to not use the system
snprintf at all, in which case %lld is the correct syntax to use but gcc
might well have some different expectation.  Without seeing the
config.log results it's hard to be sure about that one; but in any case
it's hard to credit that there are any modern machines where snprintf
can't handle long long int, so this still suggests a platform problem.

regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Warning compiling pg_dump (MinGW, Windows XP)

2011-01-17 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes:
 On 01/17/2011 07:18 AM, Pavel Golub wrote:
 So you think I should just ignore these warnings? Because I can't
 remember the same behaviour on 8.x branches...

 We've had them all along, as I said. See 
 http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=frogmouthdt=2011-01-04%2023%3A54%3A16stg=make
  
 for the same thing in an 8.2 build.

I wonder why mingw's gcc is complaining about %m when other versions of
gcc do not?  If you can't get it to shut up about that, there's not
going to be much percentage in silencing warnings about %lld.

regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Warning compiling pg_dump (MinGW, Windows XP)

2011-01-17 Thread Andrew Dunstan



On 01/17/2011 03:51 PM, Tom Lane wrote:

Andrew Dunstanand...@dunslane.net  writes:

On 01/17/2011 07:18 AM, Pavel Golub wrote:

So you think I should just ignore these warnings? Because I can't
remember the same behaviour on 8.x branches...

We've had them all along, as I said. See
http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=frogmouthdt=2011-01-04%2023%3A54%3A16stg=make
for the same thing in an 8.2 build.

I wonder why mingw's gcc is complaining about %m when other versions of
gcc do not?  If you can't get it to shut up about that, there's not
going to be much percentage in silencing warnings about %lld.




We could add -Wno-format to the flags. That makes it shut up, but maybe 
we don't want to use such a sledgehammer.


cheers

andrew

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Warning compiling pg_dump (MinGW, Windows XP)

2011-01-16 Thread Robert Haas
2011/1/13 Pavel Golub pa...@microolap.com:
 Hello, Pgsql-hackers.

 I'm getting such warnings:

 pg_dump.c: In function 'dumpSequence':
 pg_dump.c:11449:2: warning: unknown conversion type character 'l' in format
 pg_dump.c:11449:2: warning: too many arguments for format
 pg_dump.c:11450:2: warning: unknown conversion type character 'l' in format
 pg_dump.c:11450:2: warning: too many arguments for format

 Line numbers my not be the same in the official sources, because I've
 made some changes. But the lines are:

        snprintf(bufm, sizeof(bufm), INT64_FORMAT, SEQ_MINVALUE);
        snprintf(bufx, sizeof(bufx), INT64_FORMAT, SEQ_MAXVALUE);

 In my oppinion configure failed for MinGw+Windows in this case. Am I
 right? Can someone give me a hint how to avoid this?

It seems like PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT is getting the
wrong answer on your machine, though I'm not sure why.  The easiest
workaround is probably to run configure and then edit
src/include/pg_config.h before compiling.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers