Re: array column problem

From: "Rob Arnold" <rob(at)cabrion(dot)com>
To: "Dax Duskin" <dax(dot)duskin(at)zsassociates(dot)com>, <pgsql-novice(at)postgresql(dot)org>
Subject: Re: array column problem
Date: 2001-03-13 02:18:42
Message-ID: 003501c0ab63$ef336a10$4200fd0a@home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I think you need to do:

insert into tablename values('{1}, {1,2,3}');

Note brackets an single quotes.
--rob

----- Original Message -----
From: "Dax Duskin" <dax(dot)duskin(at)zsassociates(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Sent: Monday, March 12, 2001 12:06 PM
Subject: array column problem

> Hi all,
>
> I'm having some trouble setting a column to use arrays.
>
> Here's an example of what I am trying to do:
>
> create table tablename (index INTEGER, numarray INTEGER[]);
>
> insert into tablename values(1, {1,2,3});
>
> I receive the "Parser error at or near '{'" error.
>
> Any ideas? I pretty much copied the format out of Momijan's book.
>
> thanks,
> dax duskin
>
>
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Rob Arnold 2001-03-13 02:20:27 Re: [SQL] Permissons on database
Previous Message David Olbersen 2001-03-13 02:13:04 Re: Number of Records in a Table