pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: CoL <col@mportal.hu>
To: pgsql-admin@postgresql.org
Subject: Re: Duplicate primary key and also the OID !!!!
Date: Mon, 07 Apr 2003 20:27:38 +0200
Message-ID: <b6sfho$1b7d$1@news.hub.org> (raw)
In-Reply-To: <b6p5qd$1jui$1@news.hub.org>
References: <b6p5qd$1jui$1@news.hub.org>

begin;
create table temp as select distinct * from user_traffic WHERE id_user = 
6738;
delete from user_traffic WHERE id_user = 6738;
insert into user_traffic select * from temp;
drop table temp;
commit;


C.

Gaetano Mendola wrote, On 4/6/2003 2:17 PM:
> Hi all,
> I'm running postgres 7.3.2 and in a table with a primary key
> I got that primary key duplicated   :-(
> 
> I found this because each time that I try tu update the field
> with id_user_traffic = 11348 I obtain an error about key
> duplicated.
> 
> 
> SELECT oid, id_user_traffic, start_date, end_date
> FROM user_traffic
> WHERE id_user = 6738;
> 
> 
>    oid   | id_user_traffic | start_date |  end_date
> ---------+-----------------+------------+------------
>  1213776 |           11348 | 2003-03-07 | 2003-04-07
>  1213776 |           11348 | 2003-03-07 | 2003-04-07
>  1213776 |           11348 | 2003-03-07 | 2003-04-07
>  1213776 |           11348 | 2003-03-07 | 2003-04-07
>  1107090 |            9675 | 2003-01-17 | 2003-02-17
>  1213779 |           11349 | 2003-04-07 | 2003-05-07
>  1213782 |           11350 | 2003-05-07 | 2003-06-07
> 
> 
> How is it possible have the oid and the id_user_traffic (
> serial primary key ) duplicated ? Any idea ?
> 
> 
> 
> 
> 
> 
> 




view thread (5+ messages)  latest in thread

Message-ID: <b6sfho$1b7d$1@news.hub.org>
Permalink:  ../b6sfho$1b7d$1@news.hub.org/
Also on:    postgresql.org/message-id/b6sfho$1b7d$1@news.hub.org

 · 

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: col@mportal.hu
  Subject: Re: Duplicate primary key and also the OID !!!!
  In-Reply-To: <b6sfho$1b7d$1@news.hub.org>
  References: <b6p5qd$1jui$1@news.hub.org> <b6sfho$1b7d$1@news.hub.org>

* 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