Skip site navigation (1) Skip section navigation (2)

Exceptions when 0 rows affected.

From: Stef <svb(at)ucs(dot)co(dot)za>
To: pgsql-sql(at)postgresql(dot)org
Subject: Exceptions when 0 rows affected.
Date: 2004-05-10 13:08:08
Message-ID: 20040510150808.7ea12c06@svb.ucs.co.za (view raw or flat)
Thread:
Lists: pgsql-sql
Hi all,

I've been looking on Google,the archives and documentation,
but cannot find what I'm looking for. Maybe I've read the 
answer, but it's still evading me. 

I'm working with postgres 7.3.4 using the psql client.

I want to know if it's possible to raise an error in a
transactional BEGIN->END block when e.g. an update
or delete statement affects zero rows.

I want the entire transaction block to rollback when 
this happens. I can do it in perl and java , but would 
in this instance like to load a file with SQL statements
using psql -f . Is it possible?

Kind Regards
Stefan

Responses

pgsql-sql by date

Next:From: BricklenDate: 2004-05-10 14:11:20
Subject: Re: Adding MERGE to the TODO list (resend with subject)
Previous:From: Christoph HallerDate: 2004-05-10 12:49:35
Subject: Re: working with schema

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group