Re: [HACKERS] PostgreSQL 6.5.2

Поиск
Список
Период
Сортировка
От Keith Parks
Тема Re: [HACKERS] PostgreSQL 6.5.2
Дата
Msg-id 199910011902.UAA28875@mtcc.demon.co.uk
обсуждение исходный текст
Ответы Re: [HACKERS] PostgreSQL 6.5.2
Re: [HACKERS] PostgreSQL 6.5.2
Список pgsql-hackers
wieck@debis.com
>[pgsql@hot] ~/devel/src/test/regress > ./checkresults
>======   int2   ======
>10c10
>< ERROR:  pg_atoi: error reading "100000": Numerical result out of range
>---
>> ERROR:  pg_atoi: error reading "100000": Math result not representable
>======   int4   ======
>10c10
>< ERROR:  pg_atoi: error reading "1000000000000": Numerical result out of range
>---
>> ERROR:  pg_atoi: error reading "1000000000000": Math result not representable
>[pgsql@hot] ~/devel/src/test/regress >
>
>
>
>    Such a regression result while we're in the middle of feature
>    development.
>
>    I'm really impressed - if we only can keep it on this  level!
>

I'm sure we could get rid of even those errors if we were to
incorporate some test like the following and then mangle the
expected results accordingly.

Trouble is I'm not sure how portable the code is:-

SPARCLinux compiles and gives "Math result not representable"
Solaris7   compiles and gives "Result too large"

Comments?

#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
int main(void)
{       char *s = "10000000000000000000000000000000000000000000000000";       long            l = 0;       char
*badp= (char *) NULL;
 
       errno = 0;
       l = strtol(s, &badp, 10);       if (errno) {               printf("%s\n",strerror(errno));
exit(0);      } else {               printf("Error - No Error.");               exit(1);       }
 
}  



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Rexx interface po postgres ?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] PostgreSQL 6.5.2