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

--
Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches

Reply via email to