Re: invalid memory alloc request size 2147483648 using toode LIKE 'ä%' - Mailing list pgsql-general

From Andrus
Subject Re: invalid memory alloc request size 2147483648 using toode LIKE 'ä%'
Date
Msg-id f874r0$h87$1@news.hub.org
Whole thread Raw
In response to Re: invalid memory alloc request size 2147483648 using toode LIKE 'ä%'  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Re: invalid memory alloc request size 2147483648 using toode LIKE 'ä%'
List pgsql-general
> This looks like a problem already reported, and patched here:
> http://archives.postgresql.org/pgsql-committers/2007-05/msg00088.php
> but that fix hasn't made it into any released version yet.

Thank you.

I fixed it in my application by changing index to upper() instead of lower :

CREATE UNIQUE INDEX toode_toode_unique_pattern_idx1
  ON firma1.toode
  USING btree
  (upper(toode::text) text_pattern_ops);

and using

SELECT * FROM firma1.toode WHERE upper(toode)  LIKE 'Ä%'

Will this work OK ?

Andrus.


pgsql-general by date:

Previous
From: "Gavin M. Roy"
Date:
Subject: Re: Import excel to postgres based website?
Next
From: "Anton A. Patrushev"
Date:
Subject: C function problem with 8.2.4