From: | Unprivileged user <nobody> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | General Bug Report: adding column to table w/ index causes column not to be seen |
Date: | 1999-05-17 15:38:30 |
Message-ID: | 199905171538.LAA87295@hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================
Your name : Diab Jerius
Your email address : djerius(at)cfa(dot)harvard(dot)edu
Category : runtime: back-end
Severity : serious
Summary: adding column to table w/ index causes column not to be seen
System Configuration
--------------------
Operating System : Solaris 2.6
PostgreSQL version : 6.4.2
Compiler used : SunCC 4.2
Hardware:
---------
SunOS fondue 5.6 Generic_105181-12 sun4m sparc SUNW,SPARCstation-20
Versions of other tools:
------------------------
flex 2.5.4
--------------------------------------------------------------------------
Problem Description:
--------------------
It seems that if a column is created in a table with an existant index,
and an attempt is made to use that index, the backend doesn't
see the new column.
--------------------------------------------------------------------------
Test Case:
----------
The following SQL illustrates the problem:
======================================
drop table snafu;
create table snafu ( a1 text, a2 text );
insert into snafu values ( 'snark', 'fido' );
create index snafu_i1 on snafu using hash ( a1 );
alter table snafu add column a3 text;
update snafu set a3 = 'snzay' where a1 = 'snark';
=========================================
This results in
drop table snafu;
DROP
create table snafu ( a1 text, a2 text );
CREATE
insert into snafu values ( 'snark', 'fido' );
INSERT 156996266 1
create index snafu_i1 on snafu using hash ( a1 );
CREATE
alter table snafu add column a3 text;
ADD
update snafu set a3 = 'snzay' where a1 = 'snark';
ERROR: Relation snafu does not have attribute a3
Removing the "create index ..." line causes the problem to
go away.
--------------------------------------------------------------------------
Solution:
---------
--------------------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-05-17 16:11:20 | Re: [BUGS] General Bug Report: adding column to table w/ index causes column not to be seen |
Previous Message | Unprivileged user | 1999-05-17 13:22:04 | General Bug Report: GROUP BY with NULL not done properly(Oracle8 & DB/2 do this completely different) |