Re: extend VacAttrStats to allow stavalues of different types - Mailing list pgsql-patches

From Heikki Linnakangas
Subject Re: extend VacAttrStats to allow stavalues of different types
Date
Msg-id 4843A6D3.2040403@enterprisedb.com
Whole thread Raw
In response to extend VacAttrStats to allow stavalues of different types  (Jan Urbański <j.urbanski@students.mimuw.edu.pl>)
Responses Re: extend VacAttrStats to allow stavalues of different types
Re: extend VacAttrStats to allow stavalues of different types
List pgsql-patches
Jan Urbański wrote:
> Following the conclusion here:
> http://archives.postgresql.org/pgsql-hackers/2008-05/msg00273.php
> here's a patch that extends VacAttrStats to allow typanalyze functions
> to store statistic values of different types than the underlying column.

Looks good to me at first glance.

About this comment:

> +      * XXX or maybe fall back on attrtype-> stuff when these are NULL? That way
> +      * we won't break other people's custom typanalyze functions. Not sure if
> +      * any exist, though.

I tried to google for a user defined data type with a custom typanalyze
function but didn't find anything, so I don't think it's an issue. It's
a bit nasty, though, because if one exists, it will compile and run just
fine, until you run ANALYZE. In general it's better to break an old API
obviously rather than silently, so that the old code doesn't even compile.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

pgsql-patches by date:

Previous
From: daveg
Date:
Subject: Re: Feature: give pg_dump a WHERE clause expression
Next
From: David Fetter
Date:
Subject: Re: Feature: give pg_dump a WHERE clause expression