Re: [HACKERS] Sorry to nag, but... [Failures with arrays]

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: olly(at)lfix(dot)co(dot)uk (Oliver Elphick)
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Sorry to nag, but... [Failures with arrays]
Date: 1998-12-13 04:25:33
Message-ID: 199812130425.XAA14016@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-12-13 04:26:03 Re: [HACKERS] Nag: postgresql/c.h typedefs Size as 'unsigned int' on Alpha
Previous Message Bruce Momjian 1998-12-13 04:21:43 Re: [HACKERS] =ANY bug