Search Postgresql Archives

Re: OOO and postgres

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx [mailto:pgsql-general-owner@xxxxxxxxxxxxxx] On Behalf Of Bernhard Rohrer
Sent: Friday, January 07, 2011 9:41 AM
To: pgsql-general@xxxxxxxxxxxxxx
Subject:  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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux