From: kurt@kwnet.at
To: pgsql-bugs@postgresql.org
Subject: BUG #13938: CAST error on Index "function must be immutable"
Date: Tue, 09 Feb 2016 14:42:01 +0000
Message-ID: <20160209144201.2572.15861@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 13938
Logged by: Kurt Weiß
Email address: kurt@kwnet.at
PostgreSQL version: 9.1.14
Operating system: linux
Description:
CREATE TABLE ud_data (
val TEXT,
);
CREATE INDEX ud_data_FLOAT ON ud_data(CAST(val AS FLOAT)) WHERE i_type=3;
--accepted as valid.
CREATE INDEX ud_data_TIME ON ud_data(CAST(val AS INTERVAL)) WHERE
i_type=10;
--results in error "functions in index expression must be marked IMMUTABLE"
--the same error when casting to TIMESTAMP (with or without time zone)
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: kurt@kwnet.at
Subject: Re: BUG #13938: CAST error on Index "function must be immutable"
In-Reply-To: <20160209144201.2572.15861@wrigleys.postgresql.org>
References: <20160209144201.2572.15861@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox