Intentionally produce Errors

Lists: pgsql-general
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
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