dbTalk Databases Forums  

Fwd: Lots of nan's

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss Fwd: Lots of nan's in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lynn.Tilby@asu.edu
 
Posts: n/a

Default Fwd: Lots of nan's - 02-02-2004 , 04:23 PM






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.Tilby (AT) asu (DOT) edu -----
Date: Thu, 22 Jan 2004 21:56:57 -0700 (MST)
From: Lynn.Tilby (AT) asu (DOT) edu
Reply-To: Lynn.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 -----

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
  #2  
Old   
Stephan Szabo
 
Posts: n/a

Default Re: Fwd: Fwd: Lots of nan's - 02-15-2004 , 01:54 PM







On Mon, 9 Feb 2004 Lynn.Tilby (AT) asu (DOT) edu wrote:

Quote:
I was wondering if someone could give me a status or
a response on this? Is it something that is unsolvable,
just on the list, or a new flavor of a current problem, or
is it just being worked on and no one has found a solution?
Is there anything I can or should be doing to solve this,
or is this a postgres internals issue?
The sqlca.h file I see seems to imply that sqlabc and sqlcode
are longs and sqlerrd is long[6]. If that's right, writing them
with %f is a mistake (technically undefined behavior I think)

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.