Skip site navigation (1) Skip section navigation (2)

truncate cleanup

From: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>
To: pgsql-patches(at)postgresql(dot)org
Subject: truncate cleanup
Date: 2002-03-13 23:36:08
Message-ID: 1016062568.6678.465.camel@jiro (view raw or flat)
Thread:
Lists: pgsql-patches
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.

FWIW, I'm not really sure why TruncateRelation() is in
commands/createinh.c to begin with; if there is a preference, I can
remove TruncateRelation() altogether and move everything into
heap_truncate().

Cheers,

Neil

-- 
Neil Conway <neilconway(at)rogers(dot)com>
PGP Key ID: DB3C29FC

Responses

pgsql-patches by date

Next:From: Rod TaylorDate: 2002-03-14 14:50:22
Subject: pg_depend patch
Previous:From: Bruce MomjianDate: 2002-03-13 21:39:06
Subject: Re: [HACKERS] Additional fixes to ecpg - please apply patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group