From: Pierre-Frédéric Caillaud <lists@boutiquenumerique.com>
To: pgsql-sql@postgresql.org
Subject: Re: need query advice
Date: Wed, 20 Oct 2004 02:14:40 +0200
Message-ID: <opsf46yqxrcq72hf@musicbox> (raw)
In-Reply-To: <4170E524.2040101@kuehlbox.de>
References: <4170E524.2040101@kuehlbox.de>
argh, you could use contribs/intarray with a gist index...
instead of N columns use an integer[] and gist-index it, then write the
equivalent of :
where (intersection of the search array with the data array) has at least
5 elements
(or 4 elements)
(or at least 4 elements order by the number of elements desc)
in your table defs, you can express your unicity constraint on the array
with :
CHECK( uniq(yourarrau) = yourarrau AND length(yourarrau)=6 )
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: lists@boutiquenumerique.com
Subject: Re: need query advice
In-Reply-To: <opsf46yqxrcq72hf@musicbox>
* 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