From: | Ymir <ymir(at)wolfheart(dot)ro> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Arrays |
Date: | 2002-03-13 12:28:19 |
Message-ID: | 20020313122819.GA3073@wolfheart.ro |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello,
I'm trying to use a bidimensional array and I'm having the following
problem:
students=# UPDATE years SET y_grade[1] = '{2,3,4,5,6,7}';
ERROR: pg_atoi: error in "{2,3,4,5,6,7}": can't parse "{2,3,4,5,6,7}"
I've declared y_grade as a bidimensional array (y_grade smallint[][]), but
still, I get this when I describe the table:
students=# \d years
Table "years"
Column | Type | Modifiers
------------+------------+----------------------------------------
y_id | integer | not null default nextval('Y_ID'::text)
y_year | smallint |
y_student | smallint |
y_grade | smallint[] |
y_absences | smallint |
Primary key: years_pkey
(notice it's only a onedimensinal array)
I don't know if that's how it's supposed to be, but even if it is, my query
isn't working.
I'm not trying to enlarge the array, I read in the docs you can't do that:
students=# select * from years;
y_id | y_year | y_student | y_grade | y_absences
------+--------+-----------+-------------------------------+------------
4 | 1 | 1 | {{0,0,0,0,0,0},{0,0,0,0,0,0}} |
(1 row)
So, any idea why I'm getting this error?
From | Date | Subject | |
---|---|---|---|
Next Message | Bo Lorentsen | 2002-03-13 13:34:07 | Re: Stored procedure in PostgreSQL |
Previous Message | bombadil | 2002-03-13 12:09:40 | Referential integrity violation |