Rearrange order of operations in heap_create_with_catalog so that if

Tom Lane <tgl@sss.pgh.pa.us>

Commit: aa88e59ade282c41dd03a1ab386a0a408e4a43af
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2001-02-12T20:07:21Z
Releases: 7.1.1
Rearrange order of operations in heap_create_with_catalog so that if
two transactions create the same table name concurrently, the one that
fails will complain about unique index pg_class_relname_index, rather than
about pg_type_typname_index which'll confuse most people.  Free side
benefit: pg_class.reltype is correctly linked to the pg_type entry now.
It's been zero in all but the preloaded pg_class entries since who knows
when.

Files

PathChange+/−
src/backend/catalog/heap.c modified +68 −66
src/backend/catalog/pg_type.c modified +31 −21
src/backend/commands/define.c modified +4 −2
src/include/catalog/pg_type.h modified +4 −2