HELP: can i have a trigger before postgres tries to check data types?

Поиск
Список
Период
Сортировка
От Bruno Boettcher
Тема HELP: can i have a trigger before postgres tries to check data types?
Дата
Msg-id 20001206191040.B17226@erm1.u-strasbg.fr
обсуждение исходный текст
Список 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@earthling.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....


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Junaid Kalim"
Дата:
Сообщение: lo_import & lo_export
Следующее
От: clayton cottingham
Дата:
Сообщение: Re: Where Can I find JDBC driver.