Skip site navigation (1) Skip section navigation (2)

Re: error in docs

From: Joe Conway <mail(at)joeconway(dot)com>
To: andrea gelmini <andrea(dot)gelmini(at)linux(dot)it>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: error in docs
Date: 2003-08-17 02:05:20
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
andrea gelmini wrote:
> test=# SELECT * FROM sal_emp WHERE pay_by_quarter[1:4] *= 10000;
> ERROR:  Unable to identify an operator '*=' for types 'integer[]' and 'integer'
> 	You will have to retype this query using an explicit cast

There's nothing wrong with the docs (well, at least not with respect to 
your specific problem), you just need to read them again. Here's a quote 
from the link you supplied:

"However, this quickly becomes tedious for large arrays, and is not
helpful if the size of the array is unknown. Although it is not part
of the primary PostgreSQL distribution, there is an extension available
that defines new functions and operators for iterating over array
values. Using this, the above query could be:"
"To install this optional module, look in the contrib/array directory
of the PostgreSQL source distribution."

I have no idea how to install contrib/array using debian's package 
manager, but that's what you need to do.



In response to

pgsql-bugs by date

Next:From: Stephan SzaboDate: 2003-08-17 02:10:23
Subject: Re: error in docs
Previous:From: andrea gelminiDate: 2003-08-16 22:34:51
Subject: error in docs

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group