Hi All,
Please refer the following session snippet. It seems that creating and dropping an index on a table, within a transaction, leaves the table marked as having an index. Although, I don't think it's a serious bug, since we always retrieve the list using RelationGetIndexList(), and that list turns out to be empty; but, if possible we should track it down.
Even restarting the DB cluster doesn't help.
postgres=# create table t ( a int );
CREATE TABLE
postgres=# select relhasindex from pg_class where relname = 't';
relhasindex
-------------
f
(1 row)
postgres=# begin;
BEGIN
postgres=# create index ind_t_a on t(a);
CREATE INDEX
postgres=# select relhasindex from pg_class where relname = 't';
relhasindex
-------------
t
(1 row)
postgres=# \d t
Table "public.t"
Column | Type | Modifiers
--------+---------+-----------
a | integer |
Indexes:
"ind_t_a" btree (a)
postgres=# rollback;
ROLLBACK
postgres=# \d t
Table "public.t"
Column | Type | Modifiers
--------+---------+-----------
a | integer |
postgres=# select relhasindex from pg_class where relname = 't';
relhasindex
-------------
t
(1 row)
postgres=#
Best regards,
--
[EMAIL PROTECTED]
[EMAIL PROTECTED] gmail | hotmail | yahoo }.com
- [HACKERS] Found a bug Gurjeet Singh
- Re: [HACKERS] Found a bug Richard Huxton
- Re: [HACKERS] Found a bug Tom Lane
- Re: [HACKERS] Found a bug Gurjeet Singh