[Babase] Re: Ooops, census bug

Karl O. Pinc kop at meme.com
Mon Nov 20 13:00:05 EST 2006


On 11/20/2006 08:47:31 AM, kfenn wrote:
> Hi Karl,
> 
> This is the file I uploaded to babase_copy while we were on the phone  
> that day.  If I query census for ZAN, he is absent through July 20th,  
> but he never shows up as present for the rest of the census days in  
> that month.  Likewise, if I query APO, none of his July records show  
> up at all.  It seems that the blanks in the file are not being  
> interpreted as "presences".

Should be fixed now.

My concern is that it takes a ferociously long time.  Is that
because the data is made up?  (I got the error:
ERROR: insert or update on table "census" violates foreign key  
constraint "Sname on BIOGRAPH" DETAIL: Key (sname)=(ZAW) is not present  
in table "biograph".)
The database is optimized to put later data in after earlier data,
so it could be slow because the data is old.  If it's a problem
let me know and I look into it.   (Even when you've a number of
"old" months to update I think it will go much faster if you
put in the earlier months before the later ones.)

The real problem was that, for some reason, not all of the rows
had the same number of columns.  Here's the data again, with
^I shown in place of all the tab characters.  Notice how some
lines have no tabs.  I've fixed the program so it uses the number
of dates in the first row to determine how many columns there are.

One more thing.  I notice that your file ends with a blank line.
This will make the program compain because there's no SNAME.
If that's a problem let me know and I can see about ignoring
trailing blank lines.

1.10^I2006-07-03^I2006-07-07^I2006-07-12^I2006-07-14^I2006-07-18^I2006-07-20^I2006-07-24^I2006-07-28
APO^I^I^I^I^I^I^I^I
ARS^I^I^I^I^I^I^I^I
AYU^I^I^I^I^I^I^I^I
AZI^I^I^I^I^I^I^I^I
EBA^I^I^I^I^I^I^I^I
JOB^I^I^I^I^I^I^I^I
LIB^I^I^I^I^I^I^I^I
NYU^I^I^I^I^I^I^I^I
OBR^I^I^I^I^I^I^I^I
ORN^I^I^I^I^I^I^I^I
OTI^I^I^I^I^I^I^I^I
REX^I^I^I^I^I^I^I^I
TAL^I^I^I^I^I^I^I^I
YOB^I^I^I^I^I^I^I^I
ZOR^I^I^I^I^I^I^I^I
NIN
TAP
CRU
GOM
COO
BUC
FAB
FAM
SAT
COS
COT
HAD
SEE
FIW
NOS
SAS
SAG^I^I^I^I^I^I^I
HOF^I^I^I^I^I^I^I
FRU^I^I^I^I^I^I^I
ZAW^I^I^I^I^I^I^I
ZAN^I0^I0^I0^I0^I0^I0^I
CAB^I^I^I^I^I^I^I
CAI^I^I^I^I^I^I^I
CHE^I^I^I^I^I^I^I
COB^I^I^I^I^I^I^I
DRO^I^I^I^I^I^I^I
DUX^I^I^I^I^I^I^I
FAC^I^I^I^I^I^I^I
FAX^I^I^I^I^I^I^I
FLA^I^I^I^I^I^I^I
HOK^I^I^I^I^I^I^I
HOL
HON
HUM
HYM
MON
NIK
NUT
SCE
SNA
SOR
SEI
HAS
HES
DUR
DAP
HUC
HAV^I^I
DHO^I^I
COD^I^I
HIV^I^I
DED^I^I
HYP^I^I
BAT^I^I
CYC^I^I
CON^I^I



Karl <kop at meme.com>
Free Software:  "You don't pay back, you pay forward."
                  -- Robert A. Heinlein



More information about the Babase mailing list