From: Kostis Mentzelos <mentzelos@gmx.net>
To: pgsql-admin@postgresql.org
Subject: Re: duplicates
Date: Mon, 06 Sep 2004 12:40:55 +0300
Message-ID: <chhb93$16pd$1@news.hub.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0409061211580.20694@p-roman.jct.ac.il>
References: <Pine.LNX.4.58.0409060922390.20253@p-roman.jct.ac.il>
<008601c493e5$e0965940$0b00a8c0@forge>
<Pine.LNX.4.58.0409061050190.20694@p-roman.jct.ac.il>
<00c701c493eb$def5b9e0$0b00a8c0@forge>
<Pine.LNX.4.58.0409061211580.20694@p-roman.jct.ac.il>
Tsirkin Evgeny wrote:
> yes i understand that i can create a primary key/unique etc...
> however my question is if i have to understand if and why
> the i got duplicate rows inserted.
> so here is the picture:
> an application is deleting rows and inserting right after that
> new ones some of which are the same as the old one,and i am getting
> duplicates !Don't transaction should prevent this by not letting
> insert ot do something in case the delete did not succeed?
> Another option is that i have to clients deleting and then inserting the
> same thing into table ,but again should not transaction prevent duplicates
> in that case ?
>
>
>>Use something like this:
>>
>> CREATE TABLE schedule (
>> id serial PRIMARY KEY,
>> studentid decimal(9),
>> groupid decimal(10),
>> maslulsignid decimal(7),
>> tfusot varchar(29)
>> );
>>
>
>
>
No, you should lock the table.
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: mentzelos@gmx.net
Subject: Re: duplicates
In-Reply-To: <chhb93$16pd$1@news.hub.org>
References: <Pine.LNX.4.58.0409060922390.20253@p-roman.jct.ac.il> <008601c493e5$e0965940$0b00a8c0@forge> <Pine.LNX.4.58.0409061050190.20694@p-roman.jct.ac.il> <00c701c493eb$def5b9e0$0b00a8c0@forge> <Pine.LNX.4.58.0409061211580.20694@p-roman.jct.ac.il> <chhb93$16pd$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