pg.ddx.io pgsql-hackers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Andres Freund <andres@anarazel.de>
Cc: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Corey Huinker <corey.huinker@gmail.com>
Cc: Joe Conway <mail@joeconway.com>
Cc: Nikita Glukhov <n.gluhov@postgrespro.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Error-safe user functions
Date: Sat, 10 Dec 2022 13:20:13 +0100
Message-ID: <20221210122013.swbpo63go6ty2fcn@alvherre.pgsql> (raw)
In-Reply-To: <1181028.1670635727@sss.pgh.pa.us>
On 2022-Dec-09, Tom Lane wrote:
> I think though that it might be okay to just define this as
> Not Our Problem. Although we don't seem to try to enforce it,
> non-immutable domain check constraints are strongly deprecated
> (the CREATE DOMAIN man page says that we assume immutability).
> And not throwing errors is something that we usually consider
> should ride along with immutability. So I think it might be
> okay to say "if you want soft error treatment for a domain,
> make sure its check constraints don't throw errors".
I think that's fine. If the user does, say "CHECK (value > 0)" and that
results in a soft error, that seems to me enough support for now. If
they want to do something more elaborate, they can write C functions.
Maybe eventually we'll want to offer some other mechanism that doesn't
require C, but let's figure out what the requirements are. I don't
think we know that, at this point.
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"Estoy de acuerdo contigo en que la verdad absoluta no existe...
El problema es que la mentira sí existe y tu estás mintiendo" (G. Lama)
view thread (175+ messages) latest in thread
Message-ID: <20221210122013.swbpo63go6ty2fcn@alvherre.pgsql> Permalink: ../20221210122013.swbpo63go6ty2fcn@alvherre.pgsql/ Also on: postgresql.org/message-id/20221210122013.swbpo63go6ty2fcn@alvherre.pgsql ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pgsql-hackers@postgresql.org Cc: alvherre@alvh.no-ip.org, tgl@sss.pgh.pa.us, andrew@dunslane.net, andres@anarazel.de, aekorotkov@gmail.com, robertmhaas@gmail.com, david.g.johnston@gmail.com, corey.huinker@gmail.com, mail@joeconway.com, n.gluhov@postgrespro.ru, pgsql-hackers@lists.postgresql.org Subject: Re: Error-safe user functions In-Reply-To: <20221210122013.swbpo63go6ty2fcn@alvherre.pgsql> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox