On Sat, Apr 25, 2009 at 2:51 AM, Alvaro Herrera <alvherre@xxxxxxxxxxxxxxxxx> wrote: > In that case you can create a partial unique index: > > create index foo on cdr_ama_stat (abonado_a, abonado_b, fecha_llamada, > duracion) where processed = 2; Of course, the unique is missing in this one: CREATE UNIQUE INDEX foo ON cdr_ama_stat (abonado_a, abonado_b, fecha_llamada, duracion) WHERE processed = 2; -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general