From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Postgres hackers <pgsql-hackers(at)postgresql(dot)org>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
Subject: | Re: pg_partition_tree crashes for a non-defined relation |
Date: | 2018-12-08 23:15:07 |
Message-ID: | 20181208231507.GA1833@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Dec 08, 2018 at 08:46:08AM -0500, Stephen Frost wrote:
> We should really have a more clearly defined policy around this, but my
> recollection is that we often prefer to return NULL rather than throwing
> an error for the convenience of people doing things like querying
> pg_class using similar functions.
Yes, that's visibly right. At least that's what I can see from the
various pg_get_*def and pg_*_is_visible. Returning NULL would indeed
be more consistent.
> I wonder if we maybe should have a regression test for every such
> function which just queries the catalog in a way to force the function
> to be called for every relation defined in the regression tests, to
> ensure that it doesn't segfault or throw an error..
Like sqlsmith? It looks hard to me to make something like that part of
the main regression test suite, as that's going to be costly and hard to
scale with.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2018-12-08 23:59:26 | Re: pg_partition_tree crashes for a non-defined relation |
Previous Message | Alvaro Herrera | 2018-12-08 20:55:03 | Re: Statement-level rollback |