Checkout from HEAD this morning, no modifications. Did make distclean and fresh build to ensure no problems caused by mixed build. 32 bit kubuntu on single drive dual core workstation. Fresh initdb. Default configuration.
postgres=# create database bug; CREATE DATABASE postgres=# \c bug You are now connected to database "bug" as user "kgrittn". bug=# create table person (namel text not null); CREATE TABLE bug=# create table t (id int primary key) inherits (person); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "t_pkey" for table "t" CREATE TABLE bug=# create or replace function sname(person) returns text bug-# language sql immutable as $$select upper($1.namel)$$; CREATE FUNCTION bug=# create index t_sname on t (sname(t)); CREATE INDEX bug=# select oid, relname from pg_class bug-# where relname in ('person','t'); oid | relname -------+--------- 16385 | person 16391 | t (2 rows) bug=# drop table t cascade; DROP TABLE [so far, behavior is as expected] bug=# drop table person cascade; NOTICE: drop cascades to 2 other objects DETAIL: drop cascades to function sname(person) drop cascades to index t_sname ERROR: could not open relation with OID 16391 bug=# create table person (namel text not null); ERROR: relation "person" already exists bug=# create table t (id int primary key) inherits (person); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "t_pkey" for table "t" CREATE TABLE bug=# create or replace function sname(person) returns text bug-# language sql immutable as $$select upper($1.namel)$$; CREATE FUNCTION bug=# create index t_sname on t (sname(t)); ERROR: relation "t_sname" already exists bug=# select oid, relname from pg_class bug-# where relname in ('person','t'); oid | relname -------+--------- 16385 | person 16401 | t (2 rows) All is fine if the t_searchname index is left out or the t table defines all columns directly rather than inheriting them from person. Similar failure if person is dropped first or on the same statement as t. -Kevin -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs