Invalid input syntax for type numeric
Invalid input syntax for type numeric
Hello,
I have this problem. I have contacted pgdac*devart*com but no answer for the moment....
It is very urgent, because a I have stuck with this..
===================
DROP DOMAIN IF EXISTS otrotpc CASCADE;
CREATE DOMAIN otrotpc AS numeric(8,5)
NULL;
DROP TABLE IF EXISTS test_otrotpc CASCADE;
CREATE TABLE test_otrotpc
( empresa numeric(1),
tpcdto sctest.otrotpc,
CONSTRAINT pk_otrotpc
PRIMARY KEY(empresa)
);
INSERT INTO test_otrotpc VALUES (1,23.48178);
SELECT * FROM test_otrotpc;
===================
Then, put a Win32 VCL form with:
- PgConnection
- PgTable1 (pointing to test_otrotpc)
- PgDataSource1
Drop a DbGrid and a DbNavigator.
And try to insert, on a new line, the values:
empresa = 2
tpcdto = 23,48178 (comma = decimal point)
Then you get a:
EPgError
Invalid input syntax for type numeric: "23,48178"
SQLState: 22P02
procedureName: set_var_from_str
LineNumber: 3023
Position: 0
Severity: Error
I have tried to insert same values with:
* SQL Manager 2007 lite for PostgreSQL
* PgAdmin III
* PostgresDAC 2.4.1 (with same dbgrid/dbnavigator form)
All of them are ok.
It seeems a bug. Somebody can check if it is failing too.
Thanks....
I have this problem. I have contacted pgdac*devart*com but no answer for the moment....
It is very urgent, because a I have stuck with this..
===================
DROP DOMAIN IF EXISTS otrotpc CASCADE;
CREATE DOMAIN otrotpc AS numeric(8,5)
NULL;
DROP TABLE IF EXISTS test_otrotpc CASCADE;
CREATE TABLE test_otrotpc
( empresa numeric(1),
tpcdto sctest.otrotpc,
CONSTRAINT pk_otrotpc
PRIMARY KEY(empresa)
);
INSERT INTO test_otrotpc VALUES (1,23.48178);
SELECT * FROM test_otrotpc;
===================
Then, put a Win32 VCL form with:
- PgConnection
- PgTable1 (pointing to test_otrotpc)
- PgDataSource1
Drop a DbGrid and a DbNavigator.
And try to insert, on a new line, the values:
empresa = 2
tpcdto = 23,48178 (comma = decimal point)
Then you get a:
EPgError
Invalid input syntax for type numeric: "23,48178"
SQLState: 22P02
procedureName: set_var_from_str
LineNumber: 3023
Position: 0
Severity: Error
I have tried to insert same values with:
* SQL Manager 2007 lite for PostgreSQL
* PgAdmin III
* PostgresDAC 2.4.1 (with same dbgrid/dbnavigator form)
All of them are ok.
It seeems a bug. Somebody can check if it is failing too.
Thanks....
I think the reason is the changed behavoir of Numeric Types.
As discussed in my Bug-Report #6158
!!!DIFFERENT BEHAVOIR OF "=" AND "LIKE"
As discussed in my Bug-Report #6158
it is not possible to Quote all numeric types because of errors likeHello,
We'll remove quoting in the next PgDAC build.
There is no problem if a quoted value is used in WHERE.
Ticket Details
===================
Ticket ID: 6158
Department: Dac Team
Priority: Medium
Status: On Hold
!!!DIFFERENT BEHAVOIR OF "=" AND "LIKE"
ortemplate1=# SELECT 1='1';
?column?
----------
t
(1 row)
template1=# SELECT 1 LIKE '1';
ERROR: operator does not exist: integer ~~ unknown at character 10
so the error has to be cached in the place where the value from the grid is parsed and put into the parameter.SELECT
:param1*:param2 AS result
:param1(SmallInt)=1
:param2(SmallInt)=2
Error: operator is not unique: "unknown" * "unknown"
Ok. Then thats not the reason.
what kind of errors do you found? till now everything is working fine here except the problem
http://www.devart.com/forums/viewtopic.php?t=15807
but it's not really clear if thats a new problem with postgres 8.4 because that error will also occur on command line (plsql)
what kind of errors do you found? till now everything is working fine here except the problem
http://www.devart.com/forums/viewtopic.php?t=15807
but it's not really clear if thats a new problem with postgres 8.4 because that error will also occur on command line (plsql)
Hummmm....
I think I must clarify my ideas... Perhaps I have had any kind of Brain-Lock but when I have upgrade to 1.20 I have started to get a lot of type errors (Tdatetime vs TPgDateTime, string vs WideString). :-\
I have tried to go back to 1.10 but another and different errors come up.... But I have THE SAME application (replicated a few days ago) on a different computer and all is ok there.....
I ckeck slowly and I will start to open new posts or support requests.
Thanks and sorry... (
I think I must clarify my ideas... Perhaps I have had any kind of Brain-Lock but when I have upgrade to 1.20 I have started to get a lot of type errors (Tdatetime vs TPgDateTime, string vs WideString). :-\
I have tried to go back to 1.10 but another and different errors come up.... But I have THE SAME application (replicated a few days ago) on a different computer and all is ok there.....
I ckeck slowly and I will start to open new posts or support requests.
Thanks and sorry... (