Re: BUG #8684: Tables with custom range domain type cannot be analyzed - Mailing list pgsql-bugs

From Brett Neumeier
Subject Re: BUG #8684: Tables with custom range domain type cannot be analyzed
Date
Msg-id CAGSetNts0=c4RBjETsumJEWByj7ommi4PtGrJOEE6wa-iEPdJw@mail.gmail.com
Whole thread Raw
In response to BUG #8684: Tables with custom range domain type cannot be analyzed  (bneumeier@gmail.com)
List pgsql-bugs
On Tue, Dec 17, 2013 at 11:10 AM, <bneumeier@gmail.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@gmail.com)

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #8470: 9.3 locking/subtransaction performance regression
Next
From: digoal@126.com
Date:
Subject: BUG #8697: checkpoint cann't flush unlogged table's dirty page to disk.