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

From: "William ZHANG" <uniware(at)zedware(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2496: Troubles with fixed-point types (NUMERIC, DECIMAL, ...)
Date: 2006-07-11 01:04:15
Message-ID: e8utea$134o$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)ComServe-IT-Services(dot)de>
To: "William ZHANG" <uniware(at)zedware(dot)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 | Eigentmer
> --------+-------------+---------+------------
> 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-Lsungen
> -------------------------------------------------------------
> * Unix-Systemtechnik * Linux-Unternehmenslsungen
> (AIX, HPUX, Solaris, Linux) * Linux-Server & -Cluster
> * Hochverfgbarkeitssysteme * 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
> -----------------------------------------------------------------
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Sudhakar 2006-07-11 08:43:04 BUG #2523: while executing pg_dump - error occurs
Previous Message Tom Lane 2006-07-10 22:12:55 Re: ALTER TYPE ... USING(NULL) / NOT NULL violation