Exclude constraint problem

From: Alex Zepeda <zipzippy(at)sonic(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Exclude constraint problem
Date: 2010-08-30 21:05:35
Message-ID: 4C7C1D1F.3080100@sonic.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I'm relatively unsure where and how to proceed.

Short version:

I dumped a table with an exclude constraint with pg_dump, and loaded it
into another instance of postgres where it promptly failed to create the
constraint. The complaint was... key conflicts with key. IOW,
duplicate data.

This should not happen, correct? If it *should* happen, why? If it
shouldn't happen, where should I start looking?

Long version:

I'm playing with postgres 9.0b4, postgis 1.5.2 (SVN r5851). The
btree_gist contrib module and period pgFoundry module are used as
appropriate. The machine is a jail on a FreeBSD 7.2/x64 box.

I'm trying to track some GPS data that's in need of sanitization. Often
times reports will come in a few seconds apart with identical
coordinates and identical non-zero speeds, so I'd like to reject rows
with a similar position and similar time for a given vehicle.

The constraint is such:

"exclude_time_buffer" EXCLUDE USING gist (vehicle WITH =, buffer_time
WITH &&, bbox_dup WITH &&)

Buffer time is a period +- 1 minute from the report time, calculated by
the client and inserted with the other clumns. bbox_dup is a geometry
column containing a polygon.

- alex

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jeff Davis 2010-08-30 23:23:22 Re: Exclude constraint problem
Previous Message Tom Lane 2010-08-30 18:10:11 Re: psql - Segmentation Fault