problems getting a module installed

Started by Nonameabout 23 years ago2 messagesgeneral
Jump to latest
#1Noname
lchan@ssl.berkeley.edu

Hi all,
I was reading about querying arrays in postgres and that if I
wanted greater power to query arrays of unknown size, that I would
have to use the *= operator and that I would have to install the
/contrib/array module to do so. I went to /contrib/array and ran,
"make" and "make instal". Then I restarted the pgsql service (service
postgresql restart). Then I went to a preexisting database and
created a test table:

create table test ("index" int, "values" int[]) ;

populated it:

insert into test values (1, '{1,2,3,4,5}') ;

and then ran a query on it:

select * from test where values *= 2 ;

which returned me this error:

ERROR: Unable to identify an operator '*=' for types 'integer[]' and
'integer'
You will have to retype this query using an explicit cast

Do I have to do something additional to get postgres to recognize the
new *= operator? Did I mess up somewhere along the way? I'm a
relative newbie so please excuse any blatant stupidity. Thanks in
advance.

lchan

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Noname (#1)
Re: problems getting a module installed

lchan@ssl.berkeley.edu (lchan) writes:

Do I have to do something additional to get postgres to recognize the
new *= operator?

Yes, the "make install" creates a SQL script that you have to execute
in any database you want the new operators installed into.

regards, tom lane