From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | andipeer(at)gmx(dot)net |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #4421: convert_to() should be immutable |
Date: | 2008-09-17 15:24:03 |
Message-ID: | 48D12113.2000306@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
andipeer(at)gmx(dot)net wrote:
> PostgreSQL version: 8.3.3
> Operating system: Linux
> Description: convert_to() should be immutable
> Details:
>
> The function convert_to(string text, dest_encoding name) is not allowed to
> be used in a index expression, because it is not marked as "IMMUTABLE".
> According to the documentation, a function is immutable if it does not
> modify the database, and for the same arguments, it returns always the same
> results. I think that all of these conditions can be applied to the
> convert_to()-function, therefore it should be marked as "IMMUTABLE".
You can change the way a conversion is done with CREATE/DROP CONVERSION.
That's why it can't be IMMUTABLE.
(I doubt any sane person would actually do that, but that's another debate)
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | hubert depesz lubaczewski | 2008-09-17 15:49:02 | Re: BUG #4422: select ... where ... NOT EXISTS / NOT IN |
Previous Message | vasile | 2008-09-17 14:53:51 | BUG #4422: select ... where ... NOT EXISTS / NOT IN |