Search Postgresql Archives

Re: Raise exception without using plpgsql?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





čt 17. 12. 2020 v 17:45 odesílatel hubert depesz lubaczewski <depesz@xxxxxxxxxx> napsal:
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,

Some years there was discussion about this possibility

https://www.postgresql-archive.org/How-to-raise-error-from-PostgreSql-SQL-statement-if-some-condition-is-met-td5719585.html

There was another thread, but I cannot to find it

Regards

Pavel


depesz




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux