Re: Consecutive queries

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Consecutive queries
Date: 2003-04-06 22:39:52
Message-ID: 20030406223952.GK26566@libertyrms.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)libertyrms(dot)info> M2P 2A8
+1 416 646 3304 x110

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-04-06 23:41:44 Re: Consecutive queries
Previous Message Lonni Friedman 2003-04-06 22:24:45 Re: unable to dump database, toast errors