pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Viorel Anghel <vang@altavista.net>
To: pgsql-sql@postgreSQL.org
Subject: how to use arrays?
Date: Wed, 3 Feb 1999 12:49:36 -0500
Message-ID: <19990203124936.E13507@zeus.advatech.ro> (raw)

Let's assume the following structure:
  create table T1 (name char(20), code int[]);
  insert into T1 values('abcd', '{1,2,3}');
  ...
  insert into T1 values('xyz', '{3,1}');

Now i want to select all names which contains code=1
SELECT name FROM T1 WHERE 1=T1.code[1] or 1=T1.code[2] ... etc ???

-- 
        ___
       <o-o>    Viorel ANGHEL <vang@altavista.net>
       [`-']    
       -"-"-    



Message-ID: <19990203124936.E13507@zeus.advatech.ro>
Permalink:  ../19990203124936.E13507@zeus.advatech.ro/
Also on:    postgresql.org/message-id/19990203124936.E13507@zeus.advatech.ro

 · 

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: vang@altavista.net
  Subject: Re: how to use arrays?
  In-Reply-To: <19990203124936.E13507@zeus.advatech.ro>
  References: <19990203124936.E13507@zeus.advatech.ro>

* 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