Re: Consecutive queries - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: Consecutive queries
Date
Msg-id 20030406223952.GK26566@libertyrms.info
Whole thread Raw
In response to Consecutive queries  ("Raymond O'Donnell" <rod@iol.ie>)
List pgsql-general
On Sun, Apr 06, 2003 at 09:23:04PM +0100, Raymond O'Donnell wrote:
> Hello all,
>
> Is there any way to ensure that one query has completed before a
> second one is executed? I have to execute an UPDATE and follow it

Sure; do one after another in the same transaction.

> I'm accessing PostgresSQL via ADO on a windows machine, and I tried -
>
> (i) enclosing the two queries in one transaction, as follows:
>
> begin;
> update ... (etc)... ;
> select ...(etc)...;
> commit;

If this doesn't work, then there must be something you're not telling
us, or else something _really_ strange about the ADO interface.  The
UPDATE either completed or not; there'd be no way for the SELECT to
return anything different than the state of the relevant tuples.

A

--
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110


pgsql-general by date:

Previous
From: Lonni Friedman
Date:
Subject: Re: unable to dump database, toast errors
Next
From: Tom Lane
Date:
Subject: Re: Consecutive queries