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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-odbc by date

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