summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorPeter Eisentraut2000-01-16 20:05:00 +0000
committerPeter Eisentraut2000-01-16 20:05:00 +0000
commit759fba48734fdb93094ed6fe6b0d0c4d533fd0ca (patch)
tree504e54982096b18273f254a553bddbbcf16ae5f0 /src/include
parenta4e1304ed1700c9831fdacc908fa0461ef0f5151 (diff)
Included all yacc and lex files into the distribution.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/catalog.h8
-rw-r--r--src/include/commands/command.h27
-rw-r--r--src/include/nodes/nodes.h4
-rw-r--r--src/include/nodes/parsenodes.h18
-rw-r--r--src/include/utils/acl.h4
5 files changed, 41 insertions, 20 deletions
diff --git a/src/include/catalog/catalog.h b/src/include/catalog/catalog.h
index bc6a8ef6436..692f2875680 100644
--- a/src/include/catalog/catalog.h
+++ b/src/include/catalog/catalog.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: catalog.h,v 1.8 1999/07/15 23:03:41 momjian Exp $
+ * $Id: catalog.h,v 1.9 2000/01/16 20:04:57 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,9 +15,9 @@
#include "access/tupdesc.h"
-extern char *relpath(char *relname);
-extern bool IsSystemRelationName(char *relname);
-extern bool IsSharedSystemRelationName(char *relname);
+extern char *relpath(const char *relname);
+extern bool IsSystemRelationName(const char *relname);
+extern bool IsSharedSystemRelationName(const char *relname);
extern Oid newoid(void);
extern void fillatt(TupleDesc att);
diff --git a/src/include/commands/command.h b/src/include/commands/command.h
index 75aa526ca17..8829d69a458 100644
--- a/src/include/commands/command.h
+++ b/src/include/commands/command.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: command.h,v 1.15 1999/07/15 23:03:44 momjian Exp $
+ * $Id: command.h,v 1.16 2000/01/16 20:04:58 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -38,12 +38,29 @@ extern void PerformPortalClose(char *name, CommandDest dest);
extern void PortalCleanup(Portal portal);
/*
- * PerformAddAttribute
- * Performs the POSTQUEL function ADD.
+ * ALTER TABLE variants
*/
-extern void PerformAddAttribute(char *relationName, char *userName,
- bool inh, ColumnDef *colDef);
+extern void AlterTableAddColumn(const char *relationName,
+ bool inh, ColumnDef *colDef);
+extern void AlterTableAlterColumn(const char *relationName,
+ bool inh, const char *colName,
+ Node *newDefault);
+
+extern void AlterTableDropColumn(const char *relationName,
+ bool inh, const char *colName,
+ int behavior);
+
+extern void AlterTableAddConstraint(const char *relationName,
+ bool inh, Node *newConstraint);
+
+extern void AlterTableDropConstraint(const char *relationName,
+ bool inh, const char *constrName,
+ int behavior);
+
+/*
+ * LOCK
+ */
extern void LockTableCommand(LockStmt *lockstmt);
#endif /* COMMAND_H */
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index e66d6c4dfba..219bcbe6f6a 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodes.h,v 1.60 2000/01/09 00:26:42 tgl Exp $
+ * $Id: nodes.h,v 1.61 2000/01/16 20:04:58 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -145,7 +145,7 @@ typedef enum NodeTag
T_DeleteStmt,
T_UpdateStmt,
T_SelectStmt,
- T_AddAttrStmt,
+ T_AlterTableStmt,
T_AggregateStmt,
T_ChangeACLStmt,
T_ClosePortalStmt,
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 0b2a2a0e93a..53c55be4db7 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parsenodes.h,v 1.93 2000/01/14 22:11:38 petere Exp $
+ * $Id: parsenodes.h,v 1.94 2000/01/16 20:04:58 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -84,16 +84,20 @@ typedef struct Query
*****************************************************************************/
/* ----------------------
- * Add Column Statement
+ * Alter Table
* ----------------------
*/
-typedef struct AddAttrStmt
+/* The fields are used in different ways by the different variants of this command */
+typedef struct AlterTableStmt
{
NodeTag type;
- char *relname; /* the relation to add attr */
- bool inh; /* add recursively to children? */
- Node *colDef; /* the attribute definition */
-} AddAttrStmt;
+ char subtype; /* A = add, T = alter, D = drop, C = add constr, X = drop constr */
+ char *relname; /* table to work on */
+ bool inh; /* recursively on children? */
+ char *name; /* column or constraint name to act on */
+ Node *def; /* definition of new column or constraint */
+ int behavior; /* CASCADE or RESTRICT drop behavior */
+} AlterTableStmt;
/* ----------------------
* Change ACL Statement
diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h
index 71a155c9935..f5815d11cf8 100644
--- a/src/include/utils/acl.h
+++ b/src/include/utils/acl.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: acl.h,v 1.22 1999/07/15 23:04:19 momjian Exp $
+ * $Id: acl.h,v 1.23 2000/01/16 20:04:59 petere Exp $
*
* NOTES
* For backward-compatability purposes we have to allow there
@@ -168,7 +168,7 @@ extern AclId get_grosysid(char *groname);
extern char *get_groname(AclId grosysid);
extern int32 pg_aclcheck(char *relname, char *usename, AclMode mode);
-extern int32 pg_ownercheck(char *usename, char *value, int cacheid);
+extern int32 pg_ownercheck(const char *usename, const char *value, int cacheid);
extern int32 pg_func_ownercheck(char *usename, char *funcname,
int nargs, Oid *arglist);
extern int32 pg_aggr_ownercheck(char *usename, char *aggname,