Intentionally produce Errors - Mailing list pgsql-general

From Markus Schiltknecht
Subject Intentionally produce Errors
Date
Msg-id 452A2419.8040908@bluegap.ch
Whole thread Raw
List 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

pgsql-general by date:

Previous
From: "Tjibbe Rijpma"
Date:
Subject: column privileges
Next
From: Matthias.Pitzl@izb.de
Date:
Subject: Re: Intentionally produce Errors