Re: feature request ctid cast / sql exception - Mailing list pgsql-hackers

From Tom Lane
Subject Re: feature request ctid cast / sql exception
Date
Msg-id 356033.1618688797@sss.pgh.pa.us
Whole thread Raw
In response to Re: feature request ctid cast / sql exception  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: feature request ctid cast / sql exception
Re: feature request ctid cast / sql exception
List pgsql-hackers
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Sat, Apr 17, 2021 at 10:58 AM Vladimír Houba ml. <v.houba@gmail.com>
> wrote:
>> Another nice feature would be a function that can be called from a sql
>> statement and would throw an exception when executed.

> An assertion-related extension in core would be welcomed.

This has been suggested before, but as soon as you start looking
at the details you find that it's really hard to get a one-size-fits-all
definition that's any simpler than the existing plpgsql RAISE
functionality.  Different people have different ideas about how
much decoration they want around the message.  So, if 10% of the
world agrees with your choices and the other 90% keeps on using
a custom plpgsql function to do it their way, you haven't really
improved matters much.  OTOH a 90% solution might be interesting to
incorporate in core, but nobody's demonstrated that one exists.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: pg_amcheck option to install extension
Next
From: Vladimír Houba ml.
Date:
Subject: Re: feature request ctid cast / sql exception