pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Andres Freund <andres@anarazel.de>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Joe Conway <mail@joeconway.com>
Cc: Corey Huinker <corey.huinker@gmail.com>
Cc: Nikita Glukhov <n.gluhov@postgrespro.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Error-safe user functions
Date: Tue, 06 Dec 2022 15:29:15 -0500
Message-ID: <3891064.1670358555@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoYSeAFj9Ua0cMx5dTnOy1hxYzb4mNpmXk0UdSz02x0-LQ@mail.gmail.com>
References: <20221205174231.6wpmbuxafnfzlbuh@alvherre.pgsql>
	<85e40849-4458-bbb9-62ee-d9e7faf0c7dc@dunslane.net>
	<3323802.1670263204@sss.pgh.pa.us>
	<3496391.1670276406@sss.pgh.pa.us>
	<20221205234734.sab3fuxy6q2sokjd@alap3.anarazel.de>
	<3518534.1670285891@sss.pgh.pa.us>
	<3614822.1670337737@sss.pgh.pa.us>
	<f83f0176-b870-3fd8-d302-b86b6f504ac6@dunslane.net>
	<3676101.1670342821@sss.pgh.pa.us>
	<CA+TgmoYSeAFj9Ua0cMx5dTnOy1hxYzb4mNpmXk0UdSz02x0-LQ@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> I feel like this can go either way. If we pick a name that conveys a
> specific intended behavior now, and then later we want to pass some
> other sort of node for some purpose other than ignoring errors, it's
> unpleasant to have a name that sounds like it can only ignore errors.
> But if we never use it for anything other than ignoring errors, a
> specific name is clearer.

With Andres' proposal to make the function return boolean succeed/fail,
I think it's pretty clear that the only useful case is to pass an
ErrorSaveContext.  There may well be future APIs that pass some other
kind of context object to input functions, but they'll presumably
have different goals and want a different sort of wrapper function.

			regards, tom lane





view thread (175+ messages)  latest in thread

Message-ID: <3891064.1670358555@sss.pgh.pa.us>
Permalink:  ../3891064.1670358555@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3891064.1670358555@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, andrew@dunslane.net, andres@anarazel.de, alvherre@alvh.no-ip.org, mail@joeconway.com, corey.huinker@gmail.com, n.gluhov@postgrespro.ru, pgsql-hackers@lists.postgresql.org
  Subject: Re: Error-safe user functions
  In-Reply-To: <3891064.1670358555@sss.pgh.pa.us>

* 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