Re: - Mailing list pgsql-sql

From Christopher Kings-Lynne
Subject Re:
Date
Msg-id 00c701c1b6a3$83578500$0300a8c0@SOL
Whole thread Raw
In response to Problem with self-join updates...  (Benoit Menendez <benoitm@pacbell.net>)
List pgsql-sql
Hi GB,

> BEGIN
> SELECT * FROM table1 WHERE record_id = '290202' FOR UPDATE
> -- Do processing here
> UPDATE table1 SET flag1 = '11' WHERE record_id = '290202'
> COMMIT

This SQL is correct and will work as you expect.

Chris




pgsql-sql by date:

Previous
From: "David Griffiths"
Date:
Subject: Re: SELECT... FOR UPDATE
Next
From: knut.suebert@web.de
Date:
Subject: Re: synchronise 2 db pgsql ?