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

Fwd: Lots of nan's

From: Lynn(dot)Tilby(at)asu(dot)edu
To: pgsql-novice(at)postgresql(dot)org
Cc: ltilby(at)asu(dot)edu
Subject: Fwd: Lots of nan's
Date: 2004-02-02 22:23:09
Message-ID: 1075760589.401ecdcd79d2a@webmail.asu.edu (view raw or flat)
Thread:
Lists: pgsql-novice
I copeid myself on this forward and never received it so
I am sending it again....

It has been over a week and I have not seen this posted.
I was just wondering if this got lost or something...

Thanks for your help!
Lynn

----- Forwarded message from Lynn(dot)Tilby(at)asu(dot)edu -----
Date: Thu, 22 Jan 2004 21:56:57 -0700 (MST)
From: Lynn(dot)Tilby(at)asu(dot)edu
Reply-To: Lynn(dot)Tilby(at)asu(dot)edu
Subject: Lots of nan's
To: pgsql-novice(at)postgresql(dot)org

I am getting nan's all over the place...

I am running RH9 with the 2.4.20-27.9 #1 kernel, and Postgres 7.3

I have a debug macro as follows:

#define DBG_SQL(strng) if(DEBUG > 0) \
{ \
  fprintf(DBG_OUT,"\n******DBG_SQL: %s\n",strng); \
  fprintf(DBG_OUT,"sqlcaid                = %s\n", sqlca.sqlcaid); \
  fprintf(DBG_OUT,"sqlabc                 = %f\n", sqlca.sqlabc); \
  fprintf(DBG_OUT,"sqlcode                = %f\n", sqlca.sqlcode); \
  fprintf(DBG_OUT,"sqlca.sqlerrm.sqlerrml = %d\n", sqlca.sqlerrm.sqlerrml); \
  fprintf(DBG_OUT,"sqlca.sqlerrm.sqlerrmc = %s\n", sqlca.sqlerrm.sqlerrmc); \
  fprintf(DBG_OUT,"sqlerrp                = %s\n", sqlca.sqlerrp); \
  fprintf(DBG_OUT,"sqlerrd                = %f\n", sqlca.sqlerrd); \
  fprintf(DBG_OUT,"sqlext                 = %s\n", sqlca.sqlext); \
} \
 
I get the following output when turning on debugging, not all of the time, but
only occasionally:

******DBG_SQL: after CONNECT TO pma
sqlcaid                = SQLCA   
sqlabc                 = nan
sqlcode                = nan
sqlca.sqlerrm.sqlerrml = 0
sqlca.sqlerrm.sqlerrmc =
sqlerrp                = NOT SET
sqlerrd                = nan
sqlext                 =

******DBG_SQL: after WHENEVER sqlerror sqlprint
sqlcaid                = SQLCA   
sqlabc                 = nan
sqlcode                = nan
sqlca.sqlerrm.sqlerrml = 0
sqlca.sqlerrm.sqlerrmc =
sqlerrp                = NOT SET
sqlerrd                = nan
sqlext                 =

******DBG_SQL: after CREATE TABLE stck_rnkg_tmp
sqlcaid                = SQLCA   
sqlabc                 = nan
sqlcode                = nan
sqlca.sqlerrm.sqlerrml = 0
sqlca.sqlerrm.sqlerrmc =
sqlerrp                = NOT SET
sqlerrd                = nan
sqlext                 =
.
.
.
.

PLEASE NOTE! I have searched for the string 'nan' in all tables, data and code
and have not been able to find it.  I have also searched the .c output
from ecpg and not found anything.  Nan stands for not a number.

Further down in the code I get the following error:

sql error 'ERROR:  Attribute "nan" not found' in line 1235.

Line 1235 in the code is simply C code not SQL, and is C code for 20+ lines
both above and below line 1235.  I have also looked at the .c output from 
ecpg but have not found anything remotely connected.

Further down in the code when printing out further debugging info I get this:

tot_sl_prce = nan
t_expr_c_date_num = 20031017
t_by_date_num = 731490
tc_exp_date_num = 20031017
tc_exp_date_dys = 731506
t_sl_comm = 0.000000
tot_crnt_prce = 0.000000
tot_sl_prce = nan
tot_by_prce = nan
t_prft_los = nan
t_pct_prft_los = nan

Still more variables take on the value of nan.  Then a little further I get
this:

sqlcaid                = SQLCA   
sqlabc                 = 0.000000
sqlcode                = 0.000000
sqlca.sqlerrm.sqlerrml = 49
sqlca.sqlerrm.sqlerrmc = 'ERROR:  Attribute "nan" not found' in line 1235.
sqlerrp                = NOT SET
sqlerrd                = 0.000000
sqlext                 =



In doing searches on the Pgsql site I found that 'attribute' is a historical
term for column heading; but since I don't have any columns of the name nan
I can't see where 'nan' cannot be found.  I found nothing on the pgsql site
for nan, but, In searching google for nan+postgres I got about 1180 hits; but,
none of the ones I looked at were current so I don't know if this problem has
been fixed yet.

The really interesting thing is when I let this prog run it consistently 
crashes RedHat and I have to do a hardware reset to reboot.

How do I solve this problem?

Thanks for your help!!!!
Lynn


----- End forwarded message -----

pgsql-novice by date

Next:From: Josh BerkusDate: 2004-02-02 23:34:12
Subject: Re: Inserting a Null date.
Previous:From: Christian ArmeanuDate: 2004-02-02 21:30:31
Subject: Re: Postgresql And Redhat Enterprise 3

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