From: Martin Atukunda <matlads@gmail.com>
To: pgsql-bugs@postgresql.org
Subject: BUG #5784: CREATE INDEX USING GIN complains about array containing null values yet none exist
Date: Sun, 5 Dec 2010 06:50:51 GMT
Message-ID: <201012050650.oB56opvM090787@wwwmaster.postgresql.org> (raw)
The following bug has been logged online:
Bug reference: 5784
Logged by: Martin Atukunda
Email address: matlads@gmail.com
PostgreSQL version: 8.4
Operating system: Linux
Description: CREATE INDEX USING GIN complains about array containing
null values yet none exist
Details:
CREATE INDEX USING GIN complains about array containing null values yet none
exist.
Take the following SQL as an example.
-- >8 --
BEGIN;
CREATE TABLE t (id serial primary key, apps bigint[]);
INSERT INTO t (apps) VALUES ('{1,2,3,4}');
INSERT INTO t (apps) VALUES ('{1,2,3,4}');
-- insert an array with one element as a null value
INSERT INTO t (apps) VALUES ('{1,2,3,NULL}');
-- remove the null value
UPDATE t SET apps[4] = -1 WHERE apps[4] IS NULL;
-- the create index fails
CREATE INDEX t_apps_idx ON t USING GIN(apps);
COMMIT;
-- 8< --
note that index creatiion succeeds if I first create the index without
inserting a row containing an array with a null element.
- Martin -
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: matlads@gmail.com
Subject: Re: BUG #5784: CREATE INDEX USING GIN complains about array containing null values yet none exist
In-Reply-To: <201012050650.oB56opvM090787@wwwmaster.postgresql.org>
References: <201012050650.oB56opvM090787@wwwmaster.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