Re: OOO and postgres

From: Susan Cassidy <scassidy(at)stbernard(dot)com>
To: Bernhard Rohrer <graylion(at)sm-wg(dot)net>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: OOO and postgres
Date: 2011-01-07 18:01:04
Message-ID: 3A51F387FE0CC74D80FA60C146987F2501C3CD6E8F0D@oc-exchange1.stbernard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Per the error message, you need to enclose array values in braces. For example, something like:
INSERT into "Bladetypes" ("ID", "type"), values ('1', '{"Knife"}');

-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Bernhard Rohrer
Sent: Friday, January 07, 2011 9:41 AM
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] OOO and postgres

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")
)

ALTER TABLE "Bladetypes" ADD COLUMN "ID" integer;
ALTER TABLE "Bladetypes" ALTER COLUMN "ID" SET NOT NULL;

ALTER TABLE "Bladetypes" ADD COLUMN "type" character varying[];
ALTER TABLE "Bladetypes" ALTER COLUMN "type" SET NOT NULL;

is this for this list?

Thanks

Bernhard

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2011-01-07 18:15:08 Re: OOO and postgres
Previous Message Rich Shepard 2011-01-07 17:56:03 Re: OOO and postgres