Re: [BUGS] BUG #5126: convert_to preventing index scan

2009-10-22 Thread Tom Lane
Andrew Gierth writes: > "Tom" == Tom Lane writes: > Tom> Um ... locale *is* fixed within a given database, or at least > Tom> LC_COLLATE and LC_CTYPE are. If you see cases where we have > Tom> this wrong, they may need to be revisited. > The value of LC_CTYPE etc. is fixed, but the meaning t

Re: [BUGS] BUG #5126: convert_to preventing index scan

2009-10-22 Thread Andrew Gierth
> "Tom" == Tom Lane writes: Tom> The conversion itself is dependent on changeable catalog Tom> entries, ie, pg_conversion. So "stable" seems the appropriate Tom> marking to me. >> That sounds like a bit of a stretch to me... we treat lots of >> stuff as immutable which is actually easi

Re: [BUGS] BUG #5126: convert_to preventing index scan

2009-10-22 Thread Tom Lane
Andrew Gierth writes: > "Tom" == Tom Lane writes: > Tom> The conversion itself is dependent on changeable catalog > Tom> entries, ie, pg_conversion. So "stable" seems the appropriate > Tom> marking to me. > That sounds like a bit of a stretch to me... we treat lots of stuff as > immutable wh

Re: [BUGS] BUG #5126: convert_to preventing index scan

2009-10-22 Thread Andrew Gierth
> "Tom" == Tom Lane writes: >> convert_to is a builtin function. If there's a bug here, it's that >> convert_to is defined as stable rather than immutable. (Sure it >> depends on server_encoding, but that can't exactly change... if >> there's any other reason why it's not immutable, I can

Re: [BUGS] BUG #5126: convert_to preventing index scan

2009-10-22 Thread Tom Lane
Andrew Gierth writes: > Peter> You haven't told us how the convert_to function is defined. > convert_to is a builtin function. If there's a bug here, it's that > convert_to is defined as stable rather than immutable. (Sure it depends > on server_encoding, but that can't exactly change... if ther

Re: [BUGS] BUG #5126: convert_to preventing index scan

2009-10-22 Thread Andrew Gierth
> "Peter" == Peter Eisentraut writes: >> I have table with bytea column, which is indexed (1) >> I want to use index during pattern matching (eg. dir like >> someDirectoryName >> || '/%'), but concatenation of two strings cause error (2) >> So I have to use function convert_to (convertin

Re: [BUGS] BUG #5126: convert_to preventing index scan

2009-10-21 Thread Peter Eisentraut
On Mon, 2009-10-19 at 11:05 +, Roman Kapusta wrote: > I have table with bytea column, which is indexed (1) > I want to use index during pattern matching (eg. dir like > someDirectoryName > || '/%'), but concatenation of two strings cause error (2) > So I have to use function convert_to (convert

[BUGS] BUG #5126: convert_to preventing index scan

2009-10-19 Thread Roman Kapusta
The following bug has been logged online: Bug reference: 5126 Logged by: Roman Kapusta Email address: roman.kapu...@gmail.com PostgreSQL version: 8.3.8-1 Operating system: fedora 11 i586 (32bit) Description:convert_to preventing index scan Details: I have table with