Re: OOO and postgres - Mailing list pgsql-general

From Adrian Klaver
Subject Re: OOO and postgres
Date
Msg-id 4D275A2C.50906@gmail.com
Whole thread Raw
In response to Re: OOO and postgres  (Bernhard Rohrer <graylion@sm-wg.net>)
List pgsql-general
On 01/07/2011 10:16 AM, Bernhard Rohrer wrote:
> What I am not getting is - as far as I can see none of the fields _is_
> an array! So why would this error message appear?ion

The "type" field is an array type because of the square brackets after
the data type.

"type" character varying[] NOT NULL

The INSERT is not inserting the VALUES for an array correctly. To get
back to my original question, what driver are you using? If it is the
native SDBC one it does not know about arrays and is probably the cause
of the problem.

>
> On 07/01/11 17:40, Bernhard Rohrer wrote:
>> Hi guys
>>
>> I am using the postgres driver for OOO and just ran into the following
>> error:
>>
>> Error code: 1
>>
>> pq_driver: [PGRES_FATAL_ERROR]ERROR: array value must start with "{"
>> or dimension information
>> LINE 1: ...O "public"."Bladetypes" ( "ID","type") VALUES ( '1','Knife')
>> ^
>> (caused by statement 'INSERT INTO "public"."Bladetypes" ( "ID","type")
>> VALUES ( '1','Knife')')
>>
>> the table looks like this:
>>
>> CREATE TABLE "Bladetypes"
>> (
>> "ID" integer NOT NULL,
>> "type" character varying[] NOT NULL,
>> CONSTRAINT "Bladetypes_pkey" PRIMARY KEY ("ID")

>> Thanks
>>
>> Bernhard
>>
>
>


--
Adrian Klaver
adrian.klaver@gmail.com

pgsql-general by date:

Previous
From: Bernhard Rohrer
Date:
Subject: Re: OOO and postgres
Next
From: Adrian Klaver
Date:
Subject: Re: Backup and restore sequences