espena/sosicon

invalid input syntax for type integer: ""

Closed this issue · 1 comments

Sosicon generated the following psql, which contains a "" instead of NULL for an integer column (snsaksnr, i think)

INSERT INTO sosicon.object_point
            (
                        aar,
                        datafangstdato,
                        komm,
                        navntype,
                        noe,
                        object_geom,
                        objtype,
                        oppdateringsdato,
                        snavn,
                        sndato,
                        snforek,
                        snkilde,
                        snloepenr,
                        snmerk,
                        snmynd,
                        snregdato,
                        snsaksnr,
                        snskrstat,
                        snspraak,
                        sntystat,
                        ssr_id,
                        ssr_objid
            )
            VALUES
            (
                        '',
                        '20120423',
                        '0815',
                        81,
                        '6525012 193783',
                        St_transform(St_geomfromtext('POINT(193783.00000 6525012.00000)',25833),4326),
                        'Navneenhet',
                        '20100227',
                        'Skagerrak',
                        '',
                        '',
                        '',
                        NULL,
                        '',
                        'DEPT',
                        '',
                        '',
                        '',
                        'NO',
                        'H',
                        56,
                        56
            )

Any idea why this would come out as empty string instead of NULL?

I think it might be something to do with the fact that some of the sosi files input had slightly different structure. When i piped all the files into sosicon in one job then the output was ok. There were some issues regarding column sizes being too small (in the DDL) but I can work around those easily enough. Thanks for making this tool available!