mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
took some rejiggering of typename and ACL parsing, as well as moving parse_analyze call out of parser(). Restructure postgres.c processing so that parse analysis and rewrite are skipped when in abort-transaction state. Only COMMIT and ABORT statements will be processed beyond the raw parser() phase. This addresses problem of parser failing with database access errors while in aborted state (see pghackers discussions around 7/28/00). Also fix some bugs with COMMIT/ABORT statements appearing in the middle of a single query input string. Function, operator, and aggregate arguments/results can now use full TypeName production, in particular foo[] for array types. DROP OPERATOR and COMMENT ON OPERATOR were broken for unary operators. Allow CREATE AGGREGATE to accept unquoted numeric constants for initcond.
58 lines
1.6 KiB
C
58 lines
1.6 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* defrem.h
|
|
* POSTGRES define and remove utility definitions.
|
|
*
|
|
*
|
|
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* $Id: defrem.h,v 1.21 2000/10/07 00:58:20 tgl Exp $
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef DEFREM_H
|
|
#define DEFREM_H
|
|
|
|
#include "nodes/parsenodes.h"
|
|
#include "tcop/dest.h"
|
|
|
|
/*
|
|
* prototypes in defind.c
|
|
*/
|
|
extern void DefineIndex(char *heapRelationName,
|
|
char *indexRelationName,
|
|
char *accessMethodName,
|
|
List *attributeList,
|
|
List *parameterList,
|
|
bool unique,
|
|
bool primary,
|
|
Expr *predicate,
|
|
List *rangetable);
|
|
extern void ExtendIndex(char *indexRelationName,
|
|
Expr *predicate,
|
|
List *rangetable);
|
|
extern void RemoveIndex(char *name);
|
|
extern void ReindexIndex(const char *indexRelationName, bool force);
|
|
extern void ReindexTable(const char *relationName, bool force);
|
|
extern void ReindexDatabase(const char *databaseName, bool force, bool all);
|
|
|
|
/*
|
|
* prototypes in define.c
|
|
*/
|
|
extern void CreateFunction(ProcedureStmt *stmt, CommandDest dest);
|
|
extern void DefineOperator(char *name, List *parameters);
|
|
extern void DefineAggregate(char *name, List *parameters);
|
|
extern void DefineType(char *name, List *parameters);
|
|
|
|
/*
|
|
* prototypes in remove.c
|
|
*/
|
|
extern void RemoveFunction(char *functionName, List *argTypes);
|
|
extern void RemoveOperator(char *operatorName,
|
|
char *typeName1, char *typeName2);
|
|
extern void RemoveType(char *typeName);
|
|
extern void RemoveAggregate(char *aggName, char *aggType);
|
|
|
|
#endif /* DEFREM_H */
|