Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1moRCF-0004Li-1k for pgsql-general@arkaria.postgresql.org; Sat, 20 Nov 2021 14:18:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1moRCD-0008Vc-VL for pgsql-general@arkaria.postgresql.org; Sat, 20 Nov 2021 14:18:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1moRCD-0008VT-Gf for pgsql-general@lists.postgresql.org; Sat, 20 Nov 2021 14:18:25 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1moRC9-00044a-Rc for pgsql-general@lists.postgresql.org; Sat, 20 Nov 2021 14:18:24 +0000 Received: by mail-lf1-x12f.google.com with SMTP id k37so57520778lfv.3 for ; Sat, 20 Nov 2021 06:18:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=x4c9+gm9Hzofh0LYLcWrT2ytbhtKN/QKnliPgA/socA=; b=WIi8XkglnkbGEzx2dtrN3IK6vrb45Gx1r0sxQAfO+fjshfhb0QSUKGJh7YvbPuInfB SQ1OdQrGPmAlRMJ7tBGybtbKkm+f4EQGHH9JyWXn8HWN1DMdwsAOHycerFNypmsQ1O5d bDrCpVR9/Pf/Z190CfH58r2jkU03IXalK0kBdCncwiQULDhdARZP0snaJjxCt+OihJQ9 iitgloc7rl75i+UFO77YBmWhVxge9od+b2FtwnHI3i1dCzEnuOKO8IaL8PlusLKE+MCA ozY8u6QJWYP38ZrhvtF7KyOTRuk1lPyLz4iVWSHivUaBTVY/Z+Iri1CajBVdU6rurSOg dS0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=x4c9+gm9Hzofh0LYLcWrT2ytbhtKN/QKnliPgA/socA=; b=dGLwRt4NN4pOoJN+LZO6A36YOF7KKvronv7F9fKh/Ogv7rz1gk3ToXFY9miiEIPRF6 P143IzAGUklP9b8r3ZgevvLKmUehKxLpiJ0c34bc63fK8J6n+W1/PPzKfdEVkIlmLwx9 VlJ1SqzXYiGgFEP0rWuSA8WfFoTZUS2lpNAnh/t2HHu5nSI2km/hFm811SGO6f6TPEnN MtlrGE3dCFLnkYhlf26UlxX+dZdziOLfYnLBWkthgctBI++YkilU+931PBgfmU3I/TO7 XZW1etV/mx0TRmdm09kxlz5hgTLqwBGQMTtep+K3Rii19dxQtQ5F65ZawbphvplC7Epq jiww== X-Gm-Message-State: AOAM531kffppzJZL5E1tDSaXLc2IH+K4cu2S2fimP1/i8hThj8zaj0j+ haMzHO6uM//WxHb5HaFjB0s2giPntKmS3Ju3HCo= X-Google-Smtp-Source: ABdhPJypcePNoQlR/xfkqy89mPf3CloUfham8dSQFzZJHTlasTvGZvlzHWn19wvrGKmge/OGz061qsQp/MRDO2nOxOM= X-Received: by 2002:a05:6512:33c4:: with SMTP id d4mr39044555lfg.182.1637417900282; Sat, 20 Nov 2021 06:18:20 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?B?Sm9zZWYgxaBpbcOhbmVr?= Date: Sat, 20 Nov 2021 15:18:09 +0100 Message-ID: Subject: Re: insert column monetary type ver 2 To: =?UTF-8?B?0JTQvNC40YLRgNC40Lkg0JjQstCw0L3QvtCy?= Cc: pgsql-general Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk so 20. 11. 2021 v 13:45 odes=C3=ADlatel =D0=94=D0=BC=D0=B8=D1=82=D1=80=D0= =B8=D0=B9 =D0=98=D0=B2=D0=B0=D0=BD=D0=BE=D0=B2 napsal: > > Good afternoon. > Sorry about the first example. > I can't figure out the problem. Digit group group separator causes an in= sertion error, what should I do? > lc_monetary =3D 'ru_RU.UTF-8' > Digit group group separator is a space. > Financial type format: 7,649.00 =E2=82=BD > DELETE FROM ONLY bpd.class_prop_user_small_val > WHERE id_class_prop =3D 74502; > Initial version of the data: > INSERT INTO bpd. class_prop_user_small_val (id_class_prop, timestamp_clas= s, val_int, val_boolean, val_varchar, val_real, val_numeric, val_date, val_= time, val_interval, val_timestamp, val_money, val_double, max_val, round, i= d_class, id_data_type, inheritance, val_bigint, min_val, max_on, min_on, ro= und_on) VALUES (74502, '2021-09-08 10: 05:12. 618', NULL, NULL, NULL, NULL,= NULL, NULL, NULL, NULL, NULL, '7 649.00 =E2=82=BD', NULL, -1, 2, 6161, 6, = false, 0, -1, false, false, true); > ---------- > ERROR: invalid input syntax for type money: "7 649,00 =E2=82=BD" LINE 6: = ..., NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '7 649,00 ... > Corrected > INSERT INTO bpd. class_prop_user_small_val (id_class_prop, timestamp_clas= s, val_int, val_boolean, val_varchar, val_real, val_numeric, val_date, val_= time, val_interval, val_timestamp, val_money, val_double, max_val, round, i= d_class, id_data_type, inheritance, val_bigint, min_val, max_on, min_on, ro= und_on) VALUES (74502, '2021-09-08 10: 05:12. 618', NULL, NULL, NULL, NULL,= NULL, NULL, NULL, NULL, NULL, '7649.00 =E2=82=BD', NULL, -1, 2, 6161, 6, f= alse, 0, -1, false, false, true); > ----------- > INSERT 0 1 > > Why does a financial type conversion with a legal regional digit group se= parator cause an error? I'm not sure what's the problem on your side. But definitely check this link https://wiki.postgresql.org/wiki/Don't_Do_This#Don.27t_use_money explaining why money is not recommended to be used. Maybe you're facing one of the known problems.