Re: BUG #8684: Tables with custom range domain type cannot be analyzed

From: Brett Neumeier <bneumeier(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8684: Tables with custom range domain type cannot be analyzed
Date: 2013-12-23 17:45:35
Message-ID: CAGSetNts0=c4RBjETsumJEWByj7ommi4PtGrJOEE6wa-iEPdJw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Dec 17, 2013 at 11:10 AM, <bneumeier(at)gmail(dot)com> wrote:

> Bug reference: 8684
>
> (This error is being emitted from range_get_typcache because the result of
> lookup_type_cache(rngtypid, TYPECACHE_RANGE_INFO) has a rngelemtype of
> NULL,
> but I haven't tried to figure out why that is or what it should be
> instead.)
>

The problem appears to be that domains based on a range type are found by
the histogram-construction code, but have no range type information within
them; the range info is in the base type for the domain instead.

Perhaps this function should detect domain types and iteratively climb up
the base-type hierarchy until it finds the actual range type?

I would be happy to attempt such a thing and see if it helps, but have very
little familiarity with the postgresql codebase. Is there a document
somewhere that describes type lookup functions?

--
Brett Neumeier (bneumeier(at)gmail(dot)com)

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message balazs 2013-12-23 18:43:37 BUG #8698: cast and view
Previous Message Alvaro Herrera 2013-12-23 16:29:05 Re: BUG #8470: 9.3 locking/subtransaction performance regression