Search Postgresql Archives

Re: strange error occurs when adding index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hubert depesz lubaczewski <depesz@xxxxxxxxxx> writes:

> On Fri, Sep 04, 2009 at 05:42:31PM +0800, Juan Backson wrote:
>> When I tried to add the following index, I get some strange error.  Does
>> anyone know what these errors mean and how to fix it?
>> Here is the index query:
>> create index idx_product_items_digits on product_items using gist (digits
>> gist_prefix_range_ops,product_id)
>
> these are not errors, just notices. are you sure you have the latest
> prefix version?

I just realized earlier this week that the pgfoundry main page for
prefix was proposing the very old (as in avoid it) 0.2 version. It's now
fixed to list the current 1.0~rc2 version, which you'll find also in
debian testing and sid:
  http://pgfoundry.org/projects/prefix/
  http://packages.debian.org/search?searchon=sourcenames&keywords=prefix

This version still comes with #define DEBUG (hey, it's a release
candidate) and penalty() is chatty on some cases where it finds that
your prefix ranges are not containing only numbers, because the penalty
computation isn't really verified against the general case... but should
work: you just won a non-numeric-only prefix_range testing ticket :)

Have you got anything to report performance wise?

Given:
>>  __pr_penalty(sa[], a1928901[]) orig->first=0 orig->last=0
>> NOTICE:  __pr_penalty(sa[], 1206323[]) orig->first=0 orig->last=0

Could you report the result of:
  SELECT pr_penalty('sa', 'a1928901'), pr_penalty('sa', '1206323');

If you're happy with performances as is, I'll remove the NOTICE and
Assert(), if not, we'll have to either find a more general algorithm or
limit the accepted inputs.

Regards,
-- 
dim

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux