Re: Raise exception without using plpgsql? - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject Re: Raise exception without using plpgsql?
Date
Msg-id 20201217164503.GA18792@depesz.com
Whole thread Raw
In response to Raise exception without using plpgsql?  ("Joel Jacobson" <joel@compiler.org>)
Responses Re: Raise exception without using plpgsql?
List pgsql-general
On Thu, Dec 17, 2020 at 03:32:09PM +0100, Joel Jacobson wrote:
> Hi,
> Is there a way to raise an exception with a message,
> without having to add your own plpgsql helper-function?
> Currently this is what I have:

Well, you can:
DO $$ begin raise notice 'zz'; END; $$;
It's cheating though, as it still needs plpgsql.

Best regards,

depesz




pgsql-general by date:

Previous
From: Gustavsson Mikael
Date:
Subject: SV: SV: SV: Problem with ssl and psql in Postgresql 13
Next
From: Pavel Stehule
Date:
Subject: Re: Raise exception without using plpgsql?