Is anyone interested in this problem?  (At least add it to the TODO list!)

This was reported as a bug with the Debian package of 6.3.2; the same
behaviour is still present in 6.4. 

bray=> create table foo ( t text[]);
CREATE
bray=> insert into foo values ( '{"a"}');
INSERT 201354 1
bray=> insert into foo values ( '{"a","b"}');
INSERT 201355 1
bray=>  insert into foo values ( '{"a","b","c"}');
INSERT 201356 1
bray=>  select * from foo;
t            
-------------
{"a"}        
{"a","b"}    
{"a","b","c"}
(3 rows)

bray=> select t[1] from foo;
ERROR:  type name lookup of t failed
bray=> select * from foo;
t            
-------------
{"a"}        
{"a","b"}    
{"a","b","c"}
(3 rows)

bray=> select foo.t[1] from foo;
t
-
a
a
a
(3 rows)

bray=> select count(foo.t[1]) from foo;
pqReadData() -- backend closed the channel unexpectedly.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
               PGP key from public servers; key ID 32B8FAA1
                 ========================================
     "Go ye therefore, and teach all nations, baptizing them
      in the name of the Father, and of the Son, and of the 
      Holy Ghost; Teaching them to observe all things  
      whatsoever I have commanded you; and, lo, I am with 
      you alway, even unto the end of the world. Amen."     
            Matthew 28:19,20 



Sat, 05 Dec 1998 08:54:00 +0000
"Oliver Elphick" <olly@lfix.co.uk>
Sorry to nag, but... [Failures with arrays]
> Is anyone interested in this problem?  (At least add it to the TODO list!)
> 
> This was reported as a bug with the Debian package of 6.3.2; the same
> behaviour is still present in 6.4. 
> 
> bray=> create table foo ( t text[]);
> CREATE
> bray=> insert into foo values ( '{"a"}');
> INSERT 201354 1
> bray=> insert into foo values ( '{"a","b"}');
> INSERT 201355 1
> bray=>  insert into foo values ( '{"a","b","c"}');
> INSERT 201356 1
> bray=>  select * from foo;
> t            
> -------------
> {"a"}        
> {"a","b"}    
> {"a","b","c"}
> (3 rows)
> 
> bray=> select t[1] from foo;
> ERROR:  type name lookup of t failed
> bray=> select * from foo;
> t            
> -------------
> {"a"}        
> {"a","b"}    
> {"a","b","c"}
> (3 rows)
> 
> bray=> select foo.t[1] from foo;
> t
> -
> a
> a
> a
> (3 rows)
> 
> bray=> select count(foo.t[1]) from foo;
> pqReadData() -- backend closed the channel unexpectedly.
> 

I have added:

	* array index references without table name cause problems
	* aggregates on array indexes crash backend


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Sat, 12 Dec 1998 23:25:33 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] Sorry to nag, but... [Failures with arrays]
Added to TODO.

> Is anyone interested in this problem?  (At least add it to the TODO list!)
> 
> This was reported as a bug with the Debian package of 6.3.2; the same
> behaviour is still present in 6.4. 
> 
> bray=> create table foo ( t text[]);
> CREATE
> bray=> insert into foo values ( '{"a"}');
> INSERT 201354 1
> bray=> insert into foo values ( '{"a","b"}');
> INSERT 201355 1
> bray=>  insert into foo values ( '{"a","b","c"}');
> INSERT 201356 1
> bray=>  select * from foo;
> t            
> -------------
> {"a"}        
> {"a","b"}    
> {"a","b","c"}
> (3 rows)
> 
> bray=> select t[1] from foo;
> ERROR:  type name lookup of t failed
> bray=> select * from foo;
> t            
> -------------
> {"a"}        
> {"a","b"}    
> {"a","b","c"}
> (3 rows)
> 
> bray=> select foo.t[1] from foo;
> t
> -
> a
> a
> a
> (3 rows)
> 
> bray=> select count(foo.t[1]) from foo;
> pqReadData() -- backend closed the channel unexpectedly.
> 
> -- 
> Oliver Elphick                                Oliver.Elphick@lfix.co.uk
> Isle of Wight                              http://www.lfix.co.uk/oliver
>                PGP key from public servers; key ID 32B8FAA1
>                  ========================================
>      "Go ye therefore, and teach all nations, baptizing them
>       in the name of the Father, and of the Son, and of the 
>       Holy Ghost; Teaching them to observe all things  
>       whatsoever I have commanded you; and, lo, I am with 
>       you alway, even unto the end of the world. Amen."     
>             Matthew 28:19,20 
> 
> 
> 
> 


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Fri, 18 Dec 1998 13:03:43 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] Sorry to nag, but... [Failures with arrays]