From: | Bruno Boettcher <bboett(at)erm1(dot)u-strasbg(dot)fr> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | HELP: can i have a trigger before postgres tries to check data types? |
Date: | 2000-12-06 18:10:40 |
Message-ID: | 20001206191040.B17226@erm1.u-strasbg.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
hello,
now that i finally managed to write some functions and triggers in perl,
i get the following error:
insert into journal (plus,minus,description,currency,amount) VALUES
(101,420,'a test....','EUR','1.000.000');
ERROR: pg_atoi: error in "1.000.000": can't parse ".000.000"
normal since the value was declared as beeing an int4.... and i would
like to keep that this way.....
the purpose of the trigger is exactly to strip the prettyprinted number
that's incoming of eventual '.' and ',' .....
but the pg_atoi comes before even my trigger has a chance to get a grip
onto that line....
anything i can do? (besides declaring the field as of type text...)
any way i can tell the DB to use my function instead of pg_atoi when
parsing lines for a certain table?
--
ciao bboett
==============================================================
bboett(at)earthling(dot)net
http://inforezo.u-strasbg.fr/~bboett http://erm1.u-strasbg.fr/~bboett
===============================================================
the total amount of intelligence on earth is constant.
human population is growing....
From | Date | Subject | |
---|---|---|---|
Next Message | Joseph Shraibman | 2000-12-06 20:23:22 | Re: subselects |
Previous Message | Bruno Boettcher | 2000-12-06 16:59:09 | Re: what's wrong with my plperl function? |