On 04/01/12 15:43, Nigel Titley wrote: > On 03/01/12 18:27, Michael Richardson wrote: >>>>>>> "Nigel" == Nigel Titley <[email protected]> writes: >> >> No doesn't seem to have made any difference. Still the same error >> >> >> >> psql:/tmp/ledgersmb/1.2-1.3-upgrade.sql:30: ERROR: null value in >> >> column "heading" violates not-null constraint CONTEXT: SQL >> >> statement "INSERT INTO account (accno, description, category, >> >> gifi_accno, heading, contra, tax) VALUES ( $1 , $2 , $3 , $4 , $5 >> >> , $6 , $7 )" PL/pgSQL function "account_save" line 47 at SQL >> >> statement >> >> Nigel> Has anyone had any thoughts on this? I'm still stuck. >> >> This is what I did. >> I started my psql against my database. >> >> The code at that line is: >> >> SELECT account_save(id, accno, description, category, gifi_accno, NULL, >> contra, >> CASE WHEN link like '%tax%' THEN true ELSE false END, >> string_to_array(link,':')) >> FROM lsmb12.chart >> WHERE charttype = 'A'; >> >> so, I ran it like: >> >> SELECT account_save(id, accno, description, category, gifi_accno, NULL, >> contra, >> CASE WHEN link like '%tax%' THEN true ELSE false END, >> string_to_array(link,':')) >> FROM lsmb12.chart >> WHERE charttype = 'A' ORDER BY accno OFFSET 0 LIMIT 1; >> >> then incrementing the "OFFSET" value until I found the problem. >> >> You may have to "delete from account;" if you have to retry things. >> > Many thanks... I'll work through and find out which account is causing > the problem. > Hmm, this fails at the first fence, with offset 0. I think its a more fundamental error with the "account_save" procedure.
Nigel ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Ledger-smb-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
