From: Bruno Boettcher <bboett@erm1.u-strasbg.fr>
To: pgsql-sql@postgresql.org
Subject: HELP: can i have a trigger before postgres tries to check data types?
Date: Wed, 6 Dec 2000 19:10:40 +0100
Message-ID: <20001206191040.B17226@erm1.u-strasbg.fr> (raw)
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/~bboetthttp://erm1.u-strasbg.fr/~bboett
===============================================================
the total amount of intelligence on earth is constant.
human population is growing....
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: bboett@erm1.u-strasbg.fr
Subject: Re: HELP: can i have a trigger before postgres tries to check data types?
In-Reply-To: <20001206191040.B17226@erm1.u-strasbg.fr>
References: <20001206191040.B17226@erm1.u-strasbg.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox