Intentionally produce Errors

From: Markus Schiltknecht <markus(at)bluegap(dot)ch>
To: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Intentionally produce Errors
Date: 2006-10-09 10:27:37
Message-ID: 452A2419.8040908@bluegap.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

this is sort of a silly question, but: what's the proper way to
intentionally generate an error? I'm writing tests for pyPgSQL and want
to check it's error handling. Currently, I'm using:

SELECT "THIS PRODUCES AN SQL ERROR";

Is there any better way to generate errors? Probably even generating
specific errors given?

Regards

Markus

Browse pgsql-general by date

  From Date Subject
Next Message Matthias.Pitzl 2006-10-09 10:31:55 Re: Intentionally produce Errors
Previous Message Nikolay Samokhvalov 2006-10-09 10:24:28 Fwd: pg_dump VS alter database ... set search_path ...