Re: [HACKERS] snprintf causes regression tests to fail

Bruce Momjian <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32,gmane.comp.db.postgresql.devel.general
Message-ID <[email protected]>
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
  [email protected]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.