pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Phill Kenoyer <pgsql@c0de.net>
Cc: Ian Barwick <barwick@gmx.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Primary Key Problems
Date: Mon, 10 Dec 2001 13:47:23 -0800 (PST)
Message-ID: <20011210134414.P70079-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <20011208040643.GD2913@c0de.net>

On Fri, 7 Dec 2001, Phill Kenoyer wrote:

> I took your advice and checked the string size using char_length() and
> octet_length().  They are the same.
>
>  octet_length |   stock    | octet_length | inventory_type | client_id
>             5 | 10725      |            4 | used           |        60
>             5 | 10725      |            4 | used           |        60
>
> I do a daily pg_dump of the database and the scheme I posted was from
> that.  So the primary key is still active.
>
> I just dont understand how I can have dups in the primary keys, unless
> it is a bug.

Hmm, what does explain show for your query? I'd wonder if the unique
index got corrupted for some reason and so didn't see the first value
when the second was inserted.  If you search for a specific value
and try to force an index scan (use set enable_seqscan=false) do you
still get two rows (and does explain in that case show it using the
index?)







view thread (8+ messages)  latest in thread

Message-ID: <20011210134414.P70079-100000@megazone23.bigpanda.com>
Permalink:  ../20011210134414.P70079-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20011210134414.P70079-100000@megazone23.bigpanda.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 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-admin@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, pgsql@c0de.net, barwick@gmx.net
  Subject: Re: Primary Key Problems
  In-Reply-To: <20011210134414.P70079-100000@megazone23.bigpanda.com>
  References: <20011208040643.GD2913@c0de.net> <20011210134414.P70079-100000@megazone23.bigpanda.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