pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bryn Llewellyn <bryn@yugabyte.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Subject: Re: "A block containing an EXCEPTION clause is significantly more expensive to enter and exit than a block without one"
Date: Mon, 13 Jun 2022 15:38:54 -0400
Message-ID: <3910372.1655149134@sss.pgh.pa.us> (raw)
In-Reply-To: <C0F8D219-8E20-44DE-B3CD-E667F7FFAB95@yugabyte.com>
References: <24CD0FA6-F58C-44B5-B3D5-FE704A63E5CA@yugabyte.com>
	<CAFj8pRCLY-kmm5R3c-mM-eb2h+YU5Onhk1q_CatJ84Vyw=26jw@mail.gmail.com>
	<C0F8D219-8E20-44DE-B3CD-E667F7FFAB95@yugabyte.com>

Bryn Llewellyn <bryn@yugabyte.com> writes:
> OK, so I'm obliged to answer.
> Because SQL rests on the principle that you just say *what* you want but
> not *how*.

It also rests on the principle that the programmer shouldn't be too
concerned about micro-efficiencies.  You've given a perfectly good
six-line implementation of what you want; use it and be happy.

> Oracle Database 12c Release 2 (and later) has a validate_conversion() built-in.

[ shrug... ]  We are not Oracle.  One of the main ways in which we
are not Oracle is that we support extensible database functionality.
To write a "validate_conversion" function that supports extension
datatypes, but doesn't use something morally equivalent to a
subtransaction, would be a nightmare: large, fragile, and probably
not all that much faster.

			regards, tom lane





view thread (7+ messages)  latest in thread

Message-ID: <3910372.1655149134@sss.pgh.pa.us>
Permalink:  ../3910372.1655149134@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3910372.1655149134@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bryn@yugabyte.com, pavel.stehule@gmail.com, david.g.johnston@gmail.com
  Subject: Re: "A block containing an EXCEPTION clause is significantly more expensive to enter and exit than a block without one"
  In-Reply-To: <3910372.1655149134@sss.pgh.pa.us>
  References: <24CD0FA6-F58C-44B5-B3D5-FE704A63E5CA@yugabyte.com> <CAFj8pRCLY-kmm5R3c-mM-eb2h+YU5Onhk1q_CatJ84Vyw=26jw@mail.gmail.com> <C0F8D219-8E20-44DE-B3CD-E667F7FFAB95@yugabyte.com> <3910372.1655149134@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