public inbox for [email protected]
help / color / mirror / Atom feedSubject: [Pljava-dev] Possible bug, when updating BigDecimal from trigger/function
Date: Mon, 09 Jun 2008 20:47:51 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
Petr Mich?lek wrote:
>
> When PL/Java trigger/function is updating BigDecimal, scale of new
> BigDecimal value is not checked. Because of this, is possible store in
> database numeric value with greater precision than is in column definition.
>
> Please can anybody confirm this behavior and is possible to fix this.
>
I haven't tested it myself, but it certainly looks like something that
would happen when updating TriggerData. Under the hood we're using
SPI_modifytuple which is apparently too low level for pg to do the
precision/scale checks and it expects us to perform them before calling
this method. For pljava, the conversion to backend type is going
through a generic type conversion routine which doesn't have access to
typmod information. It seems like we'd have to modify the whole
coerceObject interface to support passing around typmod. I'm not sure
how hard that would be to do.
Kris Jurka
view thread (2+ messages)
reply
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 using the --to and --cc options:
reply via email
To: [email protected]
Subject: Re: [Pljava-dev] Possible bug, when updating BigDecimal from trigger/function
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox