arrays broken in 7.1.3? also, support for embedded tables? - Mailing list pgsql-bugs

From Robby Dermody
Subject arrays broken in 7.1.3? also, support for embedded tables?
Date
Msg-id 000901c19959$27fe97a0$6400000a@mrsparkles
Whole thread Raw
List pgsql-bugs
Hi, I'm running 7.1.3 on a redhat linux system, using the rpm packages from
the postgresql site:

[nova@naomi scripts]$ rpm -qa|grep postgresql
postgresql-libs-7.1.3-0.onms.5
postgresql-server-7.1.3-0.onms.5
postgresql-python-7.1.3-0.onms.5
postgresql-7.1.3-0.onms.5
postgresql-contrib-7.1.3-0.onms.5
postgresql-docs-7.1.3-0.onms.5

I've been having some problems with getting arrays to work (either I'm doing
something stupid, or they seem to be broken).

Here's what I try:

allshotup=# CREATE TABLE foo (bla0 text, bla1 varchar(20)[], bla2
char(20)[], bla3 text[]);
CREATE

allshotup=# INSERT INTO foo (bla0) VALUES ('test');
INSERT 19408 1

allshotup=# UPDATE foo SET bla1[1] = 'bla1', bla2[1] = 'bla2', bla3[1] =
'bla3' WHERE bla0='test';
UPDATE 1

allshotup=# SELECT * FROM foo;
 bla0 | bla1 | bla2 | bla3
------+------+------+------
 test |      |      |
(1 row)

allshotup=# SELECT bla1[1] FROM foo WHERE bla0='test';
 bla1
------

(1 row)

-----------------------------
etc....

Am I doing something wrong? (Note that I don't think this matters, but I
have installed the array-related contrib stuff that defines the operators
like *=, etc)

Lastly, I was wondering if anyone knew if support for embedding tables
exists? I've heard that at one point pgsql had this, but the object
relational stuff kind of got out of date and this got deprecated.

Thanks.

Robby Dermody

pgsql-bugs by date:

Previous
From: andrea gelmini
Date:
Subject: ehm...
Next
From: "Jayaraj"
Date:
Subject: pltclU