Indixing problems... - Mailing list pgsql-hackers

From Vadim Mikheev
Subject Indixing problems...
Date
Msg-id 35F5F421.C91E7F8A@krs.ru
Whole thread Raw
In response to Problem with the constraints test and PRIMARY KEY on UnixWare 7.  ("Billy G. Allie" <Bill.Allie@mug.org>)
Responses Re: [HACKERS] Indixing problems...
Re: [HACKERS] Indixing problems...
List pgsql-hackers
David Hartwig wrote:
>
> This is the same problem as that has been pestering me for two weeks.
>
> Billy, please try this simple test:
>
> CREATE TABLE foo (bar int);
>
> \d foo
>
> CREATE INDEX foo_idx ON foo USING btree (bar);
>
> \d foo
>
> Is foo gone?

Please apply this patch...

Vadim
*** src/backend/catalog/index.c.orig    Wed Sep  9 11:14:40 1998
--- src/backend/catalog/index.c    Wed Sep  9 11:15:50 1998
***************
*** 1424,1433 ****

          newtup = heap_modifytuple(tuple, pg_class, values, nulls, replace);
          heap_replace(pg_class, &tuple->t_ctid, newtup);
-         pfree(newtup);
          CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, idescs);
          CatalogIndexInsert(idescs, Num_pg_class_indices, pg_class, newtup);
          CatalogCloseIndices(Num_pg_class_indices, idescs);
      }

      if (!IsBootstrapProcessingMode())
--- 1424,1433 ----

          newtup = heap_modifytuple(tuple, pg_class, values, nulls, replace);
          heap_replace(pg_class, &tuple->t_ctid, newtup);
          CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, idescs);
          CatalogIndexInsert(idescs, Num_pg_class_indices, pg_class, newtup);
          CatalogCloseIndices(Num_pg_class_indices, idescs);
+         pfree(newtup);
      }

      if (!IsBootstrapProcessingMode())

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Macro From Hell
Next
From: David Hartwig
Date:
Subject: Re: [HACKERS] index fix report