Skip site navigation (1) Skip section navigation (2)

Re: Ok... I got most of it working but . . .

From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: "Bob Caryl" <bob(at)fis-cal(dot)com>
Cc: <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Ok... I got most of it working but . . .
Date: 2005-07-27 13:20:37
Message-ID: 6EE64EF3AB31D5448D0007DD34EEB3415C2EBA@Herge.rcsinc.local (view raw or flat)
Thread:
Lists: pgsql-odbc
> >> However, when the odbc driver tries to update the new added record,
I
> >> get the following error message server side (and at my
application):
> >>
> >>    ERROR:  invalid input syntax for type double precision:
> >> "{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}"
> >>
> >> Evidently,  the odbc driver is deciding to optimize my query
> >> perhaps?  What am I doing wrong this time?

Doesn't look like it.  I tested in psql and server converted from array
of zeroes to array of double precision just fine.  Maybe you have some
older version of the server that doesn't have the cast.

What it looks like to me is that the server is trying to convert the
entire string to double precision.  Are you sure your tables has an
array type?

Observe: (note the last error message)
esp=# create table test (d character varying[]);
CREATE TABLE
esp=# drop table test;
DROP TABLE
esp=# create table test (d numeric(12,3)[]);
CREATE TABLE
esp=# insert into test values ('{0,0,0,0,0,0,0}');
INSERT 1121797 1
esp=# drop table test;
DROP TABLE
esp=# create table test (d double precision[]);
CREATE TABLE
esp=# insert into test values ('{0,0,0,0,0,0,0}');
INSERT 1121803 1
esp=# drop table test;
DROP TABLE
esp=# create table test (d double precision[]);
CREATE TABLE
esp=# insert into test values ('{0,0,0,0,0,0,a}');
ERROR:  invalid input syntax for type double precision: "a"
esp=#

Merlin

pgsql-odbc by date

Next:From: Pailloncy Jean-GerardDate: 2005-07-27 16:46:51
Subject: iODBC & Mac OS
Previous:From: Dave PageDate: 2005-07-27 13:06:23
Subject: MS Access & foreign encoding bug

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group