head	1.13;
access;
symbols
	release_4_2:1.13
	aix_ok:1.11
	Version_2_1:1.5
	Version_2:1.2;
locks; strict;
comment	@ * @;


1.13
date	94.02.07.11.52.14;	author aoki;	state Exp;
branches;
next	1.12;

1.12
date	94.01.28.07.07.33;	author aoki;	state Exp;
branches;
next	1.11;

1.11
date	93.06.16.04.47.12;	author aoki;	state Exp;
branches;
next	1.10;

1.10
date	93.03.27.00.17.13;	author aoki;	state Exp;
branches;
next	1.9;

1.9
date	92.12.18.20.53.03;	author mao;	state Exp;
branches;
next	1.8;

1.8
date	91.11.10.20.48.53;	author clarsen;	state Exp;
branches;
next	1.7;

1.7
date	91.05.01.02.49.41;	author cimarron;	state Exp;
branches;
next	1.6;

1.6
date	91.04.19.05.34.48;	author kemnitz;	state Exp;
branches;
next	1.5;

1.5
date	90.08.18.00.39.26;	author cimarron;	state Exp;
branches;
next	1.4;

1.4
date	90.08.13.20.47.08;	author cimarron;	state Exp;
branches;
next	1.3;

1.3
date	90.08.08.08.10.47;	author cimarron;	state Exp;
branches;
next	1.2;

1.2
date	90.06.07.18.19.46;	author cimarron;	state Version_2;
branches;
next	1.1;

1.1
date	90.02.08.22.56.27;	author kemnitz;	state Exp;
branches;
next	;


desc
@New residence for renamerel and renameattr
@


1.13
log
@casting to shut up gcc
@
text
@/*
 * rename.c --
 * renameatt() and renamerel() reside here.
 */

#include <strings.h>

#include "tmp/postgres.h"

RcsId("$Header: /import/faerie/faerie/aoki/postgres/src/backend/commands/RCS/rename.c,v 1.12 1994/01/28 07:07:33 aoki Exp aoki $");

#include "nodes/pg_lisp.h"

#include "access/attnum.h"
#include "access/heapam.h"
#include "access/htup.h"
#include "access/relscan.h"
#include "access/skey.h"
#include "access/tqual.h"

#include "catalog/catname.h"
#include "catalog/syscache.h"
#include "catalog/indexing.h"

#include "commands/copy.h"

#include "executor/execdefs.h"	/* for EXEC_{FOR,BACK,FDEBUG,BDEBUG} */

#include "storage/buf.h"
#include "storage/itemptr.h"

#include "tmp/miscadmin.h"
#include "tmp/portal.h"
#include "tcop/dest.h"
#include "commands/command.h"

#include "utils/excid.h"
#include "utils/log.h"
#include "utils/mcxt.h"
#include "utils/palloc.h"
#include "utils/rel.h"

#include "catalog/pg_attribute.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_relation.h"

#include "planner/internal.h"
#include "planner/prepunion.h"	/* for find_all_inheritors */

#ifndef NO_SECURITY
#include "tmp/acl.h"
#include "catalog/syscache.h"
#endif /* !NO_SECURITY */

/*
 *	rename		- See renameatt, renamerel
 */

/*
 *	renameatt	- changes the name of a attribute in a relation
 *
 *	Attname attribute is changed in attribute catalog.
 *	No record of the previous attname is kept (correct?).
 *
 *	get proper reldesc from relation catalog (if not arg)
 *	scan attribute catalog
 *		for name conflict (within rel)
 *		for original attribute (if not arg)
 *	modify attname in attribute tuple
 *	insert modified attribute in attribute catalog
 *	delete original attribute from attribute catalog
 *
 *	XXX Renaming an indexed attribute must (eventually) also change
 *		the attribute name in the associated indexes.
 */

renameatt(relname, oldattname, newattname, userName, recurse)
	char	relname[], oldattname[], newattname[];
	Name	userName;
	int	recurse;
{
	Relation	relrdesc, attrdesc;
	HeapTuple	reltup, oldatttup, newatttup;
	ItemPointerData	oldTID;
	Relation	idescs[Num_pg_attr_indices];

	/*
	 * permissions checking.  this would normally be done in utility.c,
	 * but this particular routine is recursive.
	 *
	 * normally, only the owner of a class can change its schema.
	 */
	if (NameIsSystemRelationName((Name) relname))
	    elog(WARN, "renameatt: class \"%-.*s\" is a system catalog",
		 NAMEDATALEN, relname);
#ifndef NO_SECURITY
	if (!IsBootstrapProcessingMode() &&
	    !pg_ownercheck(userName->data, relname, RELNAME))
	    elog(WARN, "renameatt: you do not own class \"%-.*s\"",
		 NAMEDATALEN, relname);
#endif

	/*
	 * if the 'recurse' flag is set then we are supposed to rename this
	 * attribute in all classes that inherit from 'relname' (as well as
	 * in 'relname').
	 *
	 * any permissions or problems with duplicate attributes will cause
	 * the whole transaction to abort, which is what we want -- all or
	 * nothing.
	 */
	if (recurse) {
	    ObjectId myrelid, childrelid;
	    LispValue child, children;
	    
	    relrdesc = heap_openr(relname);
	    if (!RelationIsValid(relrdesc)) {
		elog(WARN, "renameatt: unknown relation: \"%-.*s\"",
		     NAMEDATALEN, relname);
	    }
	    myrelid = relrdesc->rd_id;
	    heap_close(relrdesc);

   	    /* this routine is actually in the planner */
	    children = find_all_inheritors(lispCons(lispInteger(myrelid),
						    LispNil),
					   LispNil);
	    
	    /*
	     * find_all_inheritors does the recursive search of the
	     * inheritance hierarchy, so all we have to do is process
	     * all of the relids in the list that it returns.
	     */
	    foreach (child, children) {
		NameData childname;
		
		childrelid = CInteger(CAR(child));
		if (childrelid == myrelid)
		    continue;
		relrdesc = heap_open(childrelid);
		if (!RelationIsValid(relrdesc)) {
		    elog(WARN, "renameatt: can't find catalog entry for inheriting class with oid %d",
			 childrelid);
		}
		namecpy(&childname, &(relrdesc->rd_rel->relname));
		heap_close(relrdesc);
		renameatt(&childname, oldattname, newattname,
			  userName, 0);	/* no more recursion! */
	    }
	}

	relrdesc = heap_openr(RelationRelationName);
	reltup = ClassNameIndexScan(relrdesc, relname);
	if (!PointerIsValid(reltup)) {
		heap_close(relrdesc);
		elog(WARN, "renameatt: relation \"%-.*s\" nonexistent",
		     NAMEDATALEN, relname);
		return;
	}
	heap_close(relrdesc);

	attrdesc = heap_openr(AttributeRelationName);
	oldatttup = AttributeNameIndexScan(attrdesc, reltup->t_oid, oldattname);
	if (!PointerIsValid(oldatttup)) {
		heap_close(attrdesc);
		elog(WARN, "renameatt: attribute \"%-.*s\" nonexistent",
		     NAMEDATALEN, oldattname);
	}
	if (((struct attribute *) GETSTRUCT(oldatttup))->attnum < 0) {
		elog(WARN, "renameatt: system attribute \"%-.*s\" not renamed",
		     NAMEDATALEN, oldattname);
	}

	newatttup = AttributeNameIndexScan(attrdesc, reltup->t_oid, newattname);
	if (PointerIsValid(newatttup)) {
		pfree((char *) oldatttup);
		heap_close(attrdesc);
		elog(WARN, "renameatt: attribute \"%-.*s\" exists", 
		     NAMEDATALEN, newattname);
	}

	bcopy(newattname,
	      (char *) (((struct attribute *) GETSTRUCT(oldatttup))->attname),
	      NAMEDATALEN);
	oldTID = oldatttup->t_ctid;

	/* insert "fixed" tuple */
	heap_replace(attrdesc, &oldTID, oldatttup);

	/* keep system catalog indices current */
	CatalogOpenIndices(Num_pg_attr_indices, Name_pg_attr_indices, idescs);
	CatalogIndexInsert(idescs, Num_pg_attr_indices, attrdesc, oldatttup);
	CatalogCloseIndices(Num_pg_attr_indices, idescs);

	heap_close(attrdesc);
	pfree((char *) oldatttup);
}

/*
 *	renamerel	- change the name of a relation
 *
 *	Relname attribute is changed in relation catalog.
 *	No record of the previous relname is kept (correct?).
 *
 *	scan relation catalog
 *		for name conflict
 *		for original relation (if not arg)
 *	modify relname in relation tuple
 *	insert modified relation in relation catalog
 *	delete original relation from relation catalog
 *
 *	XXX Will currently lose track of a relation if it is unable to
 *		properly replace the new relation tuple.
 */

renamerel(oldrelname, newrelname)
	char	oldrelname[], newrelname[];
{
	Relation	relrdesc;		/* for RELATION relation */
	HeapTuple	oldreltup, newreltup;
	ItemPointerData	oldTID;
	char		oldpath[MAXPGPATH], newpath[MAXPGPATH];
	Relation	idescs[Num_pg_class_indices];
	int		issystem();
	char		*relpath();
	extern		rename();
	
	if (issystem(oldrelname)) {
		elog(WARN, "renamerel: system relation \"%-.*s\" not renamed",
		     NAMEDATALEN, oldrelname);
		return;
	}
	if (issystem(newrelname)) {
		elog(WARN, "renamerel: Illegal class name: \"%-.*s\" -- pg_ is reserved for system catalogs",
		     NAMEDATALEN, newrelname);
		return;
	}

	relrdesc = heap_openr(RelationRelationName);
	oldreltup = ClassNameIndexScan(relrdesc, oldrelname);

	if (!PointerIsValid(oldreltup)) {
		heap_close(relrdesc);
		elog(WARN, "renamerel: relation \"%-.*s\" does not exist",
		     NAMEDATALEN, oldrelname);
	}

	newreltup = ClassNameIndexScan(relrdesc, newrelname);
	if (PointerIsValid(newreltup)) {
		pfree((char *) oldreltup);
		heap_close(relrdesc);
		elog(WARN, "renamerel: relation \"%-.*s\" exists", 
		     NAMEDATALEN, newrelname);
	}

	/* rename the directory first, so if this fails the rename's not done */
	(void) strcpy(oldpath, relpath(oldrelname));
	(void) strcpy(newpath, relpath(newrelname));
	if (rename(oldpath, newpath) < 0)
		elog(WARN, "renamerel: unable to rename file: %m");

	bcopy(newrelname,
	      (char *) (((struct relation *) GETSTRUCT(oldreltup))->relname),
	      NAMEDATALEN);
	oldTID = oldreltup->t_ctid;

	/* insert fixed rel tuple */
	heap_replace(relrdesc, &oldTID, oldreltup);

	/* keep the system catalog indices current */
	CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, idescs);
	CatalogIndexInsert(idescs, Num_pg_class_indices, relrdesc, oldreltup);
	CatalogCloseIndices(Num_pg_class_indices, idescs);

	pfree((char *) oldreltup);
	heap_close(relrdesc);
}
@


1.12
log
@add support for rename*
@
text
@d10 1
a10 1
RcsId("$Header: /faerie/aoki/postgres/src/backend/commands/RCS/rename.c,v 1.11 1993/06/16 04:47:12 aoki Exp aoki $");
d93 1
a93 1
	if (NameIsSystemRelationName(relname))
@


1.11
log
@%-*s -> %-.*s
@
text
@d10 1
a10 1
RcsId("$Header: /home2/aoki/postgres/src/backend/commands/RCS/rename.c,v 1.10 1993/03/27 00:17:13 aoki Exp aoki $");
d46 9
d77 1
a77 1
renameatt(relname, oldattname, newattname)
d79 2
a85 1
	int		issystem();
d87 63
a149 4
	if (issystem(relname)) {
		elog(WARN, "renameatt: system relation \"%-.*s\" not modified",
		     sizeof(NameData), relname);
		return;
d151 1
d157 1
a157 1
		     sizeof(NameData), relname);
d167 1
a167 1
		     sizeof(NameData), oldattname);
d171 1
a171 1
		     sizeof(NameData), oldattname);
d179 1
a179 1
		     sizeof(NameData), newattname);
d184 1
a184 1
	      sizeof(NameData));
d230 1
a230 1
		     sizeof(NameData), oldrelname);
d235 1
a235 1
		     sizeof(NameData), newrelname);
d245 1
a245 1
		     sizeof(NameData), oldrelname);
d253 1
a253 1
		     sizeof(NameData), newrelname);
d264 1
a264 1
	      sizeof(NameData));
@


1.10
log
@now prevents you from renaming your class to a system (pg_) class
@
text
@d10 1
a10 1
RcsId("$Header: /home2/aoki/postgres/src/backend/commands/RCS/rename.c,v 1.9 1992/12/18 20:53:03 mao Exp aoki $");
d78 1
a78 1
		elog(WARN, "renameatt: system relation \"%-*s\" not modified",
d86 1
a86 1
		elog(WARN, "renameatt: relation \"%-*s\" nonexistent",
d96 1
a96 1
		elog(WARN, "renameatt: attribute \"%-*s\" nonexistent",
d100 1
a100 1
		elog(WARN, "renameatt: system attribute \"%-*s\" not renamed",
d108 1
a108 1
		elog(WARN, "renameatt: attribute \"%-*s\" exists", 
d159 1
a159 1
		elog(WARN, "renamerel: system relation \"%-*s\" not renamed",
d164 1
a164 1
		elog(WARN, "renamerel: Illegal class name: \"%-*s\" -- pg_ is reserved for system catalogs",
d174 1
a174 1
		elog(WARN, "renamerel: relation \"%-*s\" does not exist",
d182 1
a182 1
		elog(WARN, "renamerel: relation \"%-*s\" exists", 
@


1.9
log
@keep catalog indices up to date when inserting new data
@
text
@d10 1
a10 1
RcsId("$Header: /private/mao/postgres/src/commands/RCS/rename.c,v 1.8 1991/11/10 20:48:53 clarsen Exp $");
d78 2
a79 2
		elog(WARN, "renameatt: system relation \"%s\" not modified",
		     relname);
d86 2
a87 2
		elog(WARN, "renameatt: relation \"%s\" nonexistent",
		     relname);
d96 2
a97 2
		elog(WARN, "renameatt: attribute \"%s\" nonexistent",
		     oldattname);
d100 2
a101 2
		elog(WARN, "renameatt: system attribute \"%s\" not renamed",
		     oldattname);
d108 2
a109 1
		elog(WARN, "renameatt: attribute \"%s\" exists", newattname);
d159 2
a160 2
		elog(WARN, "renamerel: system relation \"%s\" not renamed",
		     oldrelname);
d163 5
d174 2
a175 2
		elog(WARN, "renamerel: relation \"%s\" does not exist",
		     oldrelname);
d182 2
a183 1
		elog(WARN, "renamerel: relation \"%s\" exists", newrelname);
@


1.8
log
@prototypes
@
text
@d10 1
a10 1
RcsId("$Header: RCS/rename.c,v 1.7 91/05/01 02:49:41 cimarron Exp Locker: clarsen $");
d23 1
a71 1
	HeapScanDesc	relsdesc, attsdesc;
a72 1
	struct skey	key[2];
d74 1
d76 1
a76 1
	
a81 2
	ScanKeyEntryInitialize((ScanKeyEntry)&key[0], NULL, RelationNameAttributeNumber,
						   Character16EqualRegProcedure, (Datum) relname);
d83 1
a83 2
	relsdesc = heap_beginscan(relrdesc, 0, NowTimeQual, 1, key);
	reltup = heap_getnext(relsdesc, 0, (Buffer *) NULL);
a84 1
		heap_endscan(relsdesc);
a89 1
	heap_endscan(relsdesc);
a91 4
	ScanKeyEntryInitialize((ScanKeyEntry)&key[0], NULL, AttributeRelationIdAttributeNumber,
	                       Integer32EqualRegProcedure, (Datum)reltup->t_oid);
	ScanKeyEntryInitialize((ScanKeyEntry)&key[1], NULL, AttributeNameAttributeNumber,
	                       Character16EqualRegProcedure, (Datum)oldattname);
d93 1
a93 2
	attsdesc = heap_beginscan(attrdesc, 0, NowTimeQual, 2, key);
	oldatttup = heap_getnext(attsdesc, 0, (Buffer *) NULL);
d95 1
a95 2
		heap_endscan(attsdesc);
		heap_close(attrdesc);	/* XXX should be unneeded eventually */
a97 1
		return;
a101 1
		return;
a102 2
	oldatttup = palloctup(oldatttup, InvalidBuffer, attrdesc);
	heap_endscan(attsdesc);
d104 1
a104 3
	key[1].sk_data = (DATUM) newattname;
	attsdesc = heap_beginscan(attrdesc, 0, NowTimeQual, 2, key);
	newatttup = heap_getnext(attsdesc, 0, (Buffer *) NULL);
d107 2
a108 5
		heap_endscan(attsdesc);
		heap_close(attrdesc);	/* XXX should be unneeded eventually */
		elog(WARN, "renameatt: attribute \"%s\" exists",
		     newattname);
		return;
a109 1
	heap_endscan(attsdesc);
d115 9
a123 1
	heap_replace(attrdesc, &oldTID, oldatttup); /* insert "fixed" tuple */
a148 1
	HeapScanDesc	oldsdesc, newsdesc;
a149 1
	struct skey	key;
d152 1
d162 1
d164 1
a164 3

	ScanKeyEntryInitialize((ScanKeyEntry)&key, NULL, RelationNameAttributeNumber,
	                       Character16EqualRegProcedure, (Datum) oldrelname);
a165 2
	oldsdesc = heap_beginscan(relrdesc, 0, NowTimeQual, 1, &key);
	oldreltup = heap_getnext(oldsdesc, 0, (Buffer *) NULL);
d167 1
a167 2
		heap_endscan(oldsdesc);
		heap_close(relrdesc);	/* XXX should be unneeded eventually */
a170 1
	oldreltup = palloctup(oldreltup, InvalidBuffer, relrdesc);
d172 1
a172 3
	key.sk_data = (DATUM) newrelname;
	newsdesc = heap_beginscan(relrdesc, 0, NowTimeQual, 1, &key);
	newreltup = heap_getnext(newsdesc, 0, (Buffer *) NULL);
d175 2
a176 5
		heap_endscan(newsdesc);
		heap_endscan(oldsdesc);
		heap_close(relrdesc);	/* XXX should be unneeded eventually */
		elog(WARN, "renamerel: relation \"%s\" exists",
		     newrelname);
d178 7
a184 1
	heap_endscan(newsdesc);
d189 9
a197 1
	heap_replace(relrdesc, &oldTID, oldreltup); /* insert "fixed" tuple */
a198 1
	heap_endscan(oldsdesc);
a199 4
	(void) strcpy(oldpath, relpath(oldrelname));
	(void) strcpy(newpath, relpath(newrelname));
	if (rename(oldpath, newpath) < 0)
		elog(WARN, "renamerel: unable to rename file: %m");
@


1.7
log
@round II of converting simple functions to macros + code cleaning in general
@
text
@d10 1
a10 1
RcsId("$Header: RCS/rename.c,v 1.6 91/04/19 05:34:48 kemnitz Exp Locker: cimarron $");
a23 1
#include "commands/command.h"
d33 2
d82 2
a83 2
	ScanKeyEntryInitialize(&key[0], NULL, RelationNameAttributeNumber,
						   Character16EqualRegProcedure, (DATUM) relname);
d97 4
a100 4
	ScanKeyEntryInitialize(&key[0], NULL, AttributeRelationIdAttributeNumber,
	                       Integer32EqualRegProcedure, reltup->t_oid);
	ScanKeyEntryInitialize(&key[1], NULL, AttributeNameAttributeNumber,
	                       Character16EqualRegProcedure, oldattname);
d178 2
a179 2
	ScanKeyEntryInitialize(&key, NULL, RelationNameAttributeNumber,
	                       Character16EqualRegProcedure, (DATUM) oldrelname);
@


1.6
log
@uses new scankey stuff
@
text
@d10 1
a10 1
RcsId("$Header: RCS/rename.c,v 1.5 90/08/18 00:39:26 cimarron Exp Locker: kemnitz $");
a74 1
	HeapTuple	palloctup();
d83 3
a85 3
	relrdesc = amopenr(RelationRelationName);
	relsdesc = ambeginscan(relrdesc, 0, NowTimeQual, 1, key);
	reltup = amgetnext(relsdesc, 0, (Buffer *) NULL);
d87 2
a88 2
		amendscan(relsdesc);
		amclose(relrdesc);
d93 2
a94 2
	amendscan(relsdesc);
	amclose(relrdesc);
d100 3
a102 3
	attrdesc = amopenr(AttributeRelationName);
	attsdesc = ambeginscan(attrdesc, 0, NowTimeQual, 2, key);
	oldatttup = amgetnext(attsdesc, 0, (Buffer *) NULL);
d104 2
a105 2
		amendscan(attsdesc);
		amclose(attrdesc);	/* XXX should be unneeded eventually */
d116 1
a116 1
	amendscan(attsdesc);
d119 2
a120 2
	attsdesc = ambeginscan(attrdesc, 0, NowTimeQual, 2, key);
	newatttup = amgetnext(attsdesc, 0, (Buffer *) NULL);
d123 2
a124 2
		amendscan(attsdesc);
		amclose(attrdesc);	/* XXX should be unneeded eventually */
d129 1
a129 1
	amendscan(attsdesc);
d135 2
a136 2
	amreplace(attrdesc, &oldTID, oldatttup); /* insert "fixed" tuple */
	amclose(attrdesc);
a167 1
	HeapTuple	palloctup();
d175 1
a175 1
	relrdesc = amopenr(RelationRelationName);
d180 2
a181 2
	oldsdesc = ambeginscan(relrdesc, 0, NowTimeQual, 1, &key);
	oldreltup = amgetnext(oldsdesc, 0, (Buffer *) NULL);
d183 2
a184 2
		amendscan(oldsdesc);
		amclose(relrdesc);	/* XXX should be unneeded eventually */
d191 2
a192 2
	newsdesc = ambeginscan(relrdesc, 0, NowTimeQual, 1, &key);
	newreltup = amgetnext(newsdesc, 0, (Buffer *) NULL);
d195 3
a197 3
		amendscan(newsdesc);
		amendscan(oldsdesc);
		amclose(relrdesc);	/* XXX should be unneeded eventually */
d201 1
a201 1
	amendscan(newsdesc);
d206 1
a206 1
	amreplace(relrdesc, &oldTID, oldreltup); /* insert "fixed" tuple */
d208 2
a209 2
	amendscan(oldsdesc);
	amclose(relrdesc);
@


1.5
log
@eliminated less significant .h files
@
text
@d10 1
a10 1
RcsId("$Header: RCS/rename.c,v 1.4 90/08/13 20:47:08 cimarron Exp Locker: cimarron $");
d82 2
a83 4
	key[0].sk_flags = NULL;
	key[0].sk_attnum = RelationNameAttributeNumber;
	key[0].sk_opr = Character16EqualRegProcedure;	/* XXX name= */
	key[0].sk_data = (DATUM) relname;
d97 4
a100 8
	key[0].sk_flags = NULL;
	key[0].sk_attnum = AttributeRelationIdAttributeNumber;
	key[0].sk_opr = Integer32EqualRegProcedure;	/* XXX int4= */
	key[0].sk_data = (DATUM) reltup->t_oid;
	key[1].sk_flags = NULL;
	key[1].sk_attnum = AttributeNameAttributeNumber;
	key[1].sk_opr = Character16EqualRegProcedure;	/* XXX name= */
	key[1].sk_data = (DATUM) oldattname;
d178 4
a181 4
	key.sk_flags = NULL;
	key.sk_attnum = RelationNameAttributeNumber;
	key.sk_opr = Character16EqualRegProcedure;	/* XXX name= */
	key.sk_data = (DATUM) oldrelname;
@


1.4
log
@added pathnames to include statements
@
text
@d10 1
a10 1
RcsId("$Header: RCS/rename.c,v 1.3 90/08/08 08:10:47 cimarron Exp Locker: cimarron $");
d32 1
a32 2
#include "tmp/globals.h"	/* for IsUnderPostmaster */
#include "tmp/name.h"		/* for NameIsEqual */
@


1.3
log
@reorganized some header files
@
text
@d6 1
a6 1
#include "postgres.h"
d8 1
a8 1
RcsId("$Header: RCS/rename.c,v 1.2 90/06/07 18:19:46 cimarron Version_2 Locker: cimarron $");
d10 1
a10 3
#include <strings.h>
#include "skey.h"
#include "log.h"
d12 1
a12 18
#include "attnum.h"
#include "buf.h"
#include "catname.h"
#include "copy.h"
#include "excid.h"
#include "executor.h"	/* for EXEC_{FOR,BACK,FDEBUG,BDEBUG} */
#include "globals.h"	/* for IsUnderPostmaster */
#include "itemptr.h"
#include "heapam.h"
#include "htup.h"
#include "mcxt.h"
#include "name.h"	/* for NameIsEqual */
#include "pg_lisp.h"
#include "portal.h"
#include "rel.h"
#include "relscan.h"
#include "syscache.h"
#include "tqual.h"
d14 6
a19 2
#include "command.h"
#include "palloc.h"
d21 21
a44 1

@


1.2
log
@made changes to simplify header include files
@
text
@d6 1
a6 1
#include "c.h"
d8 1
a8 1
RcsId("$Header: RCS/rename.c,v 1.1 90/02/08 22:56:27 kemnitz Exp $");
a13 1
#include "anum.h"
a15 1
#include "cat.h"
a25 1
#include "oid.h"
a29 1
#include "rproc.h"
d36 3
@


1.1
log
@Initial revision
@
text
@d8 1
a8 1
RcsId("$Header: RCS/command.c,v 1.11 89/10/20 21:11:58 hirohama Exp $");
d11 1
a11 1
#include "access.h"
@
