Re: BUG #2496: Troubles with fixed-point types (NUMERIC, DECIMAL,...) - Mailing list pgsql-bugs

From William ZHANG
Subject Re: BUG #2496: Troubles with fixed-point types (NUMERIC, DECIMAL,...)
Date
Msg-id e8utea$134o$1@news.hub.org
Whole thread Raw
In response to BUG #2496: Troubles with fixed-point types (NUMERIC, DECIMAL,...)  ("Heinz-Peter Heidinger" <hph@comserve-it-services.de>)
List pgsql-bugs
The logged statement is:

    INSERT INTO "public"."junk"  ( "preis" ) VALUES ( $1 )

If you send it via psql, pgsql will raise error:

    ERROR:  there is no parameter $1

I don't know why you got the error message saying "type mismatch".
But sending the following statement via psql will cause the similar error
you got:

    PREPARE foo (VARCHAR) AS INSERT INTO "junk" ( "preis" ) VALUES ( $1 )

Can you change the parameter "log_error_verbosity" to "verbose", and
send me the log file?

Regards,
William ZHANG

----- Original Message -----
From: "ComServe IT-Services" <hph@ComServe-IT-Services.de>
To: "William ZHANG" <uniware@zedware.org>
Sent: Monday, July 10, 2006 10:25 PM
Subject: Re: BUG #2496: Troubles with fixed-point types
(NUMERIC,DECIMAL,...)


> Hello William,
>
> Am Di, den 27.06.2006 schrieb William ZHANG um 17:01:
>> Can you set "log_statement" in postgresql.conf and post the logged
>> statements?
>
> Sure. See the appended screen-shot "Whole-screen.png"
>
> Also appended is the postgresql.conf
>
> The quirk happens with fixed-pointcoloums (DECIMAL, NUMERIC, MONEY) and
> BOOLEAN coloums as well when using the JDBC abstraction layer in locale
> 'German' (and maybe all others than 'C' or 'en_US' as well)
>
> Table definition:
>
>        comserve=> \c junk
>        Sie sind jetzt mit der Datenbank »junk« verbunden.
>        junk=> \d
>                    Liste der Relationen
>         Schema |    Name     |   Typ   | Eigentümer
>        --------+-------------+---------+------------
>         public | Tabelle1    | Tabelle | comserve
>         public | junk        | Tabelle | comserve
>         public | junk_id_seq | Sequenz | comserve
>        (3 Zeilen)
>
>        junk=> \d junk
>                                    Tabelle »public.junk«
>         Spalte |     Typ      |                      Attribute
>        --------+--------------+------------------------------------------------------
>         id     | integer      | not null default
>        nextval('public.junk_id_seq'::text)
>         preis  | numeric(5,2) |
>        Indexe:
>            »junk_pkey« PRIMARY KEY, btree (id)
>
>        junk=>
>
>
> If you need further assistance: just let me know!
> I hope we can cut down this bad finger, since an Office-System that
> cannot store business figures to a DB doesn't make much sense - at least
> with that specific DBMS.
>
> Thanks for your concern anyway.
>
>
>> With regards,
>> William ZHANG
>
> Best regards,
> Peter Heidinger
> --
> -----------------------------------------------------------------
>                    ComServe - IT-Services
>                  Think IT, Plan IT, Do IT!
>
>                      Steeler Str. 121
>                         45138 Essen
>   -------------------------------------------------------------
>               Professionelle Unix- & Linux-Lösungen
>   -------------------------------------------------------------
>   * Unix-Systemtechnik             * Linux-Unternehmenslösungen
>     (AIX, HPUX, Solaris, Linux)    * Linux-Server & -Cluster
>   * Hochverfügbarkeitssysteme      * Linux-Virtual-Server
>   * Proaktive Security-Konzepte
>   * Enterprise-Backup-Konzepte
>     mit Tivoli-Storage-Manager
> -----------------------------------------------------------------
>                Telefon    : +49 (201) 319-9875
>                Fax        : +49 (201) 319-9876
>                Mobil      : 0160/6111-819
>                http://ComServe-IT-Services.de
> -----------------------------------------------------------------
>

pgsql-bugs by date:

Previous
From: Christian Kratzer
Date:
Subject: Re: partial indexes not used on parameterized queries?
Next
From: "Sudhakar"
Date:
Subject: BUG #2523: while executing pg_dump - error occurs