Re: Select for update

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Havasvölgyi Ottó <h(dot)otto(at)freemail(dot)hu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Select for update
Date: 2005-07-29 06:58:05
Message-ID: 20050729065805.GA21479@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jul 29, 2005 at 00:05:46 +0200,
Havasvölgyi Ottó <h(dot)otto(at)freemail(dot)hu> wrote:
>
> This function deletes a row, and updates the pid field where pid is geater
> than the deleted pid value, so that the gap caused by the deletion is not
> present any more.

This isn't directly related to your problem, but why are you doing this?
This is a pretty inefficient thing to be doing unless there is a business
rule that there can't be gaps in the pid values. If you just want to
number rows in reports, you should do that in your reporting application,
not by continuously renumbering your records.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Zlatko Matić 2005-07-29 07:34:40 A6 parameter in ODBC connection string
Previous Message Richard Huxton 2005-07-29 06:48:46 Re: Can't connect to posgresql server by using pgadmin