BUG #8333: Conversions from TEXT to range types are not immutable

From: quassnoi(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #8333: Conversions from TEXT to range types are not immutable
Date: 2013-07-25 11:53:20
Message-ID: E1V2K6i-0008QX-54@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 8333
Logged by: Alex Bolenok
Email address: quassnoi(at)gmail(dot)com
PostgreSQL version: 9.2.4
Operating system: Fedora 19
Description:

SET lc_messages TO 'en_US.UTF-8';

DROP TABLE IF EXISTS
mytable;

CREATE TABLE
mytable
(
id INT NOT NULL PRIMARY KEY,
vtext TEXT NOT NULL,
vrange INT8RANGE NOT NULL
);

INSERT
INTO mytable
SELECT 1, t, t::INT8RANGE
FROM (
VALUES
('[1, 10]')
) q(t);

CREATE INDEX
ix_mytable_vrange
ON mytable
USING GIST (vrange);

CREATE INDEX
ix_mytable_vtext
ON mytable
USING GIST ((vtext::INT8RANGE));

--

SET
DROP TABLE
psql:<stdin>:12: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit
index "mytable_pkey" for table "mytable"
CREATE TABLE
INSERT 0 1
CREATE INDEX
psql:<stdin>:30: ERROR: functions in index expression must be marked
IMMUTABLE

--

I expected the second index to be created as well.

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2013-07-25 13:32:00 Re: BUG #8271: Configure warning: sys/ucred.h: present but cannot be compiled
Previous Message poddubom 2013-07-25 10:40:12 BUG #8332: Error 2920 installation