The attached patch cleans up the implementation of the TRUNCATE command;
authorBruce Momjian <bruce@momjian.us>
Tue, 19 Mar 2002 02:58:20 +0000 (02:58 +0000)
committerBruce Momjian <bruce@momjian.us>
Tue, 19 Mar 2002 02:58:20 +0000 (02:58 +0000)
commita9819ca253ba13f07a6c4433ef5ecd94c007a716
tree9c4d6695aaedaafe7927b6cfcadd7ac4ef66c87f
parentd8e70cd829c517890fd35de74d2654e5bdaf201b
The attached patch cleans up the implementation of the TRUNCATE command;
in the current code, the authentication logic (check user, check the
relation we're operating on, etc) is done in tcop/utility.c, whereas the
actual TRUNCATE command in done in TruncateRelation() in
commands/createinh.c (which is really just a wrapper over
heap_truncate() in catalog/heap.c). This patch moves the authentication
logic into TruncateRelation(), as well as making some minor code
cleanups.

Neil Conway
src/backend/catalog/heap.c
src/backend/commands/creatinh.c
src/backend/tcop/utility.c
src/include/catalog/heap.h
src/include/commands/creatinh.h