pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] user-defined numeric data types triggering ERROR: unsupported type
Date: Sun, 04 Mar 2018 14:37:15 -0500
Message-ID: <25629.1520192235@sss.pgh.pa.us> (raw)
In-Reply-To: <07b0dcd6-45f7-a2d3-99c6-115490b2cc98@2ndquadrant.com>
References: <b68441b6-d18f-13ab-b43b-9a72188a4e02@2ndquadrant.com>
	<9389.1506003842@sss.pgh.pa.us>
	<4b444362-4240-49e0-3523-724e5932b060@2ndquadrant.com>
	<24767.1506180446@sss.pgh.pa.us>
	<d526eb53-dbd6-d414-8e5d-21e644ce4549@2ndquadrant.com>
	<14597.1520038563@sss.pgh.pa.us>
	<42f4e37e-f923-6ea9-4172-cdec5a8c2d25@2ndquadrant.com>
	<b5cede7b-354b-83e6-ab1f-7a1bf8a232fa@2ndquadrant.com>
	<11916.1520127473@sss.pgh.pa.us>
	<82f29126-df5a-d4bc-f5b5-47233e29aaa6@2ndquadrant.com>
	<15879.1520182782@sss.pgh.pa.us>
	<07b0dcd6-45f7-a2d3-99c6-115490b2cc98@2ndquadrant.com>

Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
> FWIW I originally constructed the tests merely to verify that the fix
> actually fixes the issue, but I think we should add some tests to make
> sure it does not get broken in the future. It took quite a bit of time
> until someone even hit the issue, so a breakage may easily get unnoticed
> for a long time.

Oh, well, that was another problem I had with it: those tests do basically
nothing to ensure that we won't add another such problem in the future.
If somebody added support for a new type FOO, and forgot to ensure that
FOO-vs-not-FOO cases behaved sanely, these tests wouldn't catch it.
(At least, not unless the somebody added a FOO-vs-not-FOO case to these
tests, but it's hardly likely they'd do that if they hadn't considered
the possibility.)

I think actually having put in the coding patterns for what to do with
unsupported cases is our best defense against similar oversights in
future: probably people will copy those coding patterns.  Maybe the bytea
precedent proves that some people will fail to think about it no matter
what, but I don't know what more we can do.

			regards, tom lane




view thread (18+ messages)  latest in thread

Message-ID: <25629.1520192235@sss.pgh.pa.us>
Permalink:  ../25629.1520192235@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25629.1520192235@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, tomas.vondra@2ndquadrant.com
  Subject: Re: [HACKERS] user-defined numeric data types triggering ERROR: unsupported type
  In-Reply-To: <25629.1520192235@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