BUG #8333: Conversions from TEXT to range types are not immutable - Mailing list pgsql-bugs

From quassnoi@gmail.com
Subject BUG #8333: Conversions from TEXT to range types are not immutable
Date
Msg-id E1V2K6i-0008QX-54@wrigleys.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      8333
Logged by:          Alex Bolenok
Email address:      quassnoi@gmail.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.

pgsql-bugs by date:

Previous
From: poddubom@mail.ru
Date:
Subject: BUG #8332: Error 2920 installation
Next
From: Tom Lane
Date:
Subject: Re: BUG #8271: Configure warning: sys/ucred.h: present but cannot be compiled