Selects with Array member

Started by Nathan Heagyabout 25 years ago4 messagesgeneral
Jump to latest
#1Nathan Heagy
nathan@frontlogic.com

I need to know how to select based on a value's membership in an array. I
have tried something like

select * from this_table where this_list *= 'a';

which I found after many obscure searches on google. However pgsql doesn't
know what to do with this operator. Any idea or advice are greatly
appreciated.

Nathan Heagy

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Front Logic . Vividworks . Cow Comics . Thirty-Nine Days

#2gianpaolo racca
gianpaolo@preciso.net
In reply to: Nathan Heagy (#1)
Re: Selects with Array member

On Fri, Jan 19, 2001 at 09:55:53AM -0600, Nathan Heagy wrote:

You need the array functions included in the contrib directory of the source code...
I don't know why it isn't part of the standard distribution.
Bye

#3Nathan Heagy
nathan@frontlogic.com
In reply to: gianpaolo racca (#2)
Re: Selects with Array member

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You need the array functions included in the contrib directory of the source code...
I don't know why it isn't part of the standard distribution.

Ok, here is a question that should maybe go to novice as well. I'm not the
admin for the db, but he's gone until Monday so I'll need to set this up
myself. I have compiled the array module and put it in the
pgsql/lib/modules/ directory. Now how do I get pgsql to load this module
automatically?

Thanks,

Nathan Heagy

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Front Logic . Vividworks . Cow Comics . Thirty-Nine Days

#4gianpaolo racca
gianpaolo@preciso.net
In reply to: Nathan Heagy (#3)
Re: Selects with Array member

On Fri, Jan 19, 2001 at 11:11:33AM -0600, Nathan Heagy wrote:

Ok, here is a question that should maybe go to novice as well. I'm not the
admin for the db, but he's gone until Monday so I'll need to set this up
myself. I have compiled the array module and put it in the
pgsql/lib/modules/ directory. Now how do I get pgsql to load this module
automatically?

I think it's written in the README, but I'm quite sure that you need privileges
on the database (not on the whole postgres) to activate it. Otherwise I don't know how to proceed.

bye