You could probably create a before insert trigger which compares the number of
fractional digits in the given number with the defined scale (surely some
system table can offer you that) and raises an exception if needed. I do agree
though with Niklas Johansson's remarks and wonder with him on wh
On 15 feb 2008, at 08.28, Horst Dehmer wrote:
Is there an easy way to enforce strict handling of numeric values
with scales, i.e. raise an exception/error instead of rounding
values to the specified scale?
insert into dummy values(3.141); -- insert #1
insert into dummy values(3.1415); --
On Fri, Feb 15, 2008 at 1:28 AM, Horst Dehmer <[EMAIL PROTECTED]> wrote:
>
>
> Hi!
>
> Is there an easy way to enforce strict handling of numeric values with
> scales, i.e. raise an exception/error instead of rounding values to the
> specified scale?
I can't think of an easy way. But you can alwa
Hi!
Is there an easy way to enforce strict handling of numeric values with
scales, i.e. raise an exception/error instead of rounding values to the
specified scale?
In a given schema with 250+ tables I have lots of numeric columns with a
scale > 0. The docs (chapter 8.1.2) state clearly that gre
On 2008-02-14 15:19, Tom Lane wrote:
It's not exactly clear what you checked, but it works as expected for me. See
test case below, proving that indexscan works just fine with a parameter
declared using %type.
regards, tom lane
Consider:
CREATE TABLE zzz( aaa CHA
"Dean Gibson (DB Administrator)" <[EMAIL PROTECTED]> writes:
> So, is this the best (or only) way to solve this? I haven't done
> exhaustive checking, but it appears that specifying the type of
> parameters in the function prototype is only used for type-checking (and
> function matching), and
Last night I tore my hair out for about three hours with the following
problem (v8.3.0):
I had a simple scalar query that I wanted to create a function for.
However, when I created the function and called it from another query OR
the PSQL command line, it was two orders of magnitude SLOWER th
Sebastian Ritter написа:
Hi all,
I have a question regarding functions. How can I return zero rows from a
function whose return type is a table row? I did the following test and it
did not work as expected:
[...]
CREATE OR REPLACE FUNCTION foobar(boolean) RETURNS SETOF x AS $_$
DECLARE
Hi all,
I have a question regarding functions. How can I return zero rows from a
function whose return type is a table row? I did the following test and it
did not work as expected:
CREATE OR REPLACE FUNCTION
fn_get_user (integer) RETURNS usertable AS '
DECLARE
in_userid A