postgresql/src/include/parser
Bruce Momjian abb1b3e770 I checked the alter table code, and started suspecting the relation
cache.  I found if I manually added a line to flush the whole relation
cache, the assert error disappeared.  Looking through the code, I found
that the relation cache is flushed at the end of each query if the
reference count is zero for the relation.  However, printf's showed that
the rd_relcnt(reference count) for the accessed query was not returning
to zero after each query.

It turns out the parser was doing a heap_ropen in parser/analyze.c to
get information about the table's columns, but was not doing a
heap_close.

This was causing the query after the ALTER TABLE ADD to see the old
table structure, and the executor's assert was reporting the problem.
1996-10-13 04:26:39 +00:00
..
catalog_utils.h Clean up th ecompile process by centralizing the include files 1996-08-28 07:27:54 +00:00
dbcommands.h Clean up th ecompile process by centralizing the include files 1996-08-28 07:27:54 +00:00
keywords.h Clean up th ecompile process by centralizing the include files 1996-08-28 07:27:54 +00:00
parse_query.h Clean up th ecompile process by centralizing the include files 1996-08-28 07:27:54 +00:00
parse_state.h I checked the alter table code, and started suspecting the relation 1996-10-13 04:26:39 +00:00
parsetree.h Clean up th ecompile process by centralizing the include files 1996-08-28 07:27:54 +00:00
scansup.h Clean up th ecompile process by centralizing the include files 1996-08-28 07:27:54 +00:00
sysfunc.h Clean up th ecompile process by centralizing the include files 1996-08-28 07:27:54 +00:00