Re: PSQL undesired transaction behavior when connection is lost.

From: Steven Klassen <sklassen(at)commandprompt(dot)com>
To: Mike Benoit <ipso(at)snappymail(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PSQL undesired transaction behavior when connection is lost.
Date: 2004-10-07 19:52:59
Message-ID: 20041007195259.GA19692@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

* Steven Klassen <sklassen(at)commandprompt(dot)com> [2004-10-07 12:33:34 -0700]:

> DELETE FROM pay_stub_entry
> JOIN pay_stub ON (pay_stub_entry.pay_stub_id = pay_stub.id)
> WHERE pay_stub.created_date >=1096527603;

After RTFM'ing it appears you can't do actual joins with delete so
we'll just have to daisy-chain the where clause.

DELETE FROM pay_stub_entry
WHERE pay_stub_entry.pay_stub_id = pay_stub.id
AND pay_stub.created_date >=1096527603;

--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication & Support Services, (503) 667-4564

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Jowett 2004-10-07 20:10:55 Re: Problem with boolean type
Previous Message David Fetter 2004-10-07 19:40:38 DDL triggers [was Re: database constraints]