pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dim Zegebart <zager@post.comstar.ru>
To: pgsql-sql@postgresql.org
Subject: querying array
Date: Tue, 09 Jun 1998 16:27:36 +0400
Message-ID: <357D2A38.4892C577@post.comstar.ru> (raw)

Hi,
is there any way to do selection from table by testing array attribute
for
presence of defined value ?
SQL speaking :
create tabel foo(n int2[]);
insert into foo (n) values('{1,2,3}');
insert into foo (n) values('{4,7,8,5}');
insert into foo (n) values('{4,5}');
//now I want to select only exeplars with n containing '5'. It should be
second and third records :
select * from foo where foo.n?????
//That I shoud type next ?

Thank in advance.

--
____ ____
|   \   /   Dim Zegebart
____/____

Moscow Russia
WWW - http://www.geocities.com/siliconvalley/pines/7817





view thread (2+ messages)  latest in thread

Message-ID: <357D2A38.4892C577@post.comstar.ru>
Permalink:  ../357D2A38.4892C577@post.comstar.ru/
Also on:    postgresql.org/message-id/357D2A38.4892C577@post.comstar.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: zager@post.comstar.ru
  Subject: Re: querying array
  In-Reply-To: <357D2A38.4892C577@post.comstar.ru>
  References: <357D2A38.4892C577@post.comstar.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox