Skip site navigation (1) Skip section navigation (2)

Re: snprintf causes regression tests to fail

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Nicolai Tufar <ntufar(at)gmail(dot)com>,Magnus Hagander <mha(at)sollentuna(dot)net>, pgsql-hackers(at)postgresql(dot)org,pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: snprintf causes regression tests to fail
Date: 2005-03-01 05:55:20
Message-ID: 200503010555.j215tKk00448@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-hackers-win32
Bruce Momjian wrote:
> I can confirm your failure in current sources on Win32:
> 
> 	template1=# create table test(x int8);
> 	CREATE TABLE
> 	template1=# insert into test values ('4567890123456789');
> 	INSERT 17235 1
> 	template1=# select * from test;
> 	     x
> 	------------
> 	 -869367531
> 	(1 row)
> 
> and it knows it is a large number:
> 
> 	template1=# select * from test where x > 1000::int8;
> 	     x
> 	------------
> 	 -869367531
> 	(1 row)
> 	template1=# select * from test where x < 1000::int8;
> 	 x
> 	---
> 	(0 rows)
> 
> I am going to add some debugs to see what is being passed to *printf().

I have not found the solution yet but am heading to bed.  My next guess
is that Win32 isn't handling va_arg(..., long long int) properly.

-- 
  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

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-03-01 06:05:04
Subject: Re: mysterious log output
Previous:From: Robert TreatDate: 2005-03-01 05:32:43
Subject: mysterious log output

pgsql-hackers-win32 by date

Next:From: Nicolai TufarDate: 2005-03-01 14:22:05
Subject: Re: [pgsql-hackers-win32] snprintf causes regression tests to fail
Previous:From: Bruce MomjianDate: 2005-03-01 04:54:42
Subject: Re: snprintf causes regression tests to fail

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group