pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Julien Cigar <jcigar@ulb.ac.be>
Cc: pgsql-sql@postgresql.org
Subject: Re: ALL() question
Date: Wed, 14 Nov 2007 13:21:10 +0000
Message-ID: <473AF646.2010307@archonet.com> (raw)
In-Reply-To: <1195052270.3190.21.camel@frodon.be-bif.ulb.ac.be>
References: <1195047542.3190.9.camel@frodon.be-bif.ulb.ac.be>
	<473AE27E.6050103@archonet.com>
	<1195051800.3190.18.camel@frodon.be-bif.ulb.ac.be>
	<1195052270.3190.21.camel@frodon.be-bif.ulb.ac.be>

Julien Cigar wrote:
> I finally found a solution:
> 
> SELECT specimen_id 
> FROM specimen_test_bits 
> GROUP BY specimen_id 
> HAVING array_accum(test_bit_id) =  '{2,3,4}';
> 
> .. but I don't think it's very "clean" ..

The key question is whether you can rely on getting (2,3,4) or whether 
you might get (4,3,2) or some other ordering.

-- 
   Richard Huxton
   Archonet Ltd



view thread (10+ messages)  latest in thread

Message-ID: <473AF646.2010307@archonet.com>
Permalink:  ../473AF646.2010307@archonet.com/
Also on:    postgresql.org/message-id/473AF646.2010307@archonet.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dev@archonet.com, jcigar@ulb.ac.be
  Subject: Re: ALL() question
  In-Reply-To: <473AF646.2010307@archonet.com>

* 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