Commit 759fba48 authored by Peter Eisentraut's avatar Peter Eisentraut

Included all yacc and lex files into the distribution.

parent a4e1304e
...@@ -176,67 +176,6 @@ Ftp file ...@@ -176,67 +176,6 @@ Ftp file
</Para> </Para>
</Step> </Step>
<Step Performance="required">
<Para>
Some platforms use <application>flex</application>.
If your system uses <application>flex</application> then make sure
you have a good version. To check, type
<programlisting>
$ flex --version
</programlisting>
</Para>
<Para>
If the <application>flex</application> command is not found then you probably do not need it.
If the version is 2.5.2 or 2.5.4 or greater then you are okay. If it
is 2.5.3 or before 2.5.2 then you will have to upgrade <application>flex</application>. You may
get it at
<ulink url="ftp://prep.ai.mit.edu/pub/gnu/flex-2.5.4.tar.gz">ftp://prep.ai.mit.edu/pub/gnu/flex-2.5.4.tar.gz</ulink>.
</Para>
<Para>
If you need <application>flex</application> and don't have it or have the wrong version, then
you will be told so when you attempt to compile the program. Feel
free to skip this step if you aren't sure you need it. If you do
need it then you will be told to install/upgrade <application>flex</application> when you try to
compile <productname>Postgres</productname>.
</Para>
<Para>
You may want to do the entire <application>flex</application> installation from
the root account, though that is not absolutely necessary.
Assuming that you want the installation to place files in the usual default
areas, type the following:
<ProgramListing>
$ su -
$ cd /usr/local/src
ftp prep.ai.mit.edu
ftp> cd /pub/gnu/
ftp> binary
ftp> get flex-2.5.4.tar.gz
ftp> quit
$ gunzip -c flex-2.5.4.tar.gz | tar xvf -
$ cd flex-2.5.4
$ configure --prefix=/usr
$ gmake
$ gmake check
# You must be root when typing the next line:
$ gmake install
$ cd /usr/local/src
$ rm -rf flex-2.5.4
</ProgramListing>
</Para>
<Para>
This will update files <filename>/usr/man/man1/flex.1</filename>,
<filename>/usr/bin/flex</filename>,
<filename>/usr/lib/libfl.a</filename>,
<filename>/usr/include/FlexLexer.h</filename> and will add a link
<filename>/usr/bin/flex++</filename> which points to flex.
</Para>
</Step>
<Step Performance="required"> <Step Performance="required">
<Para> <Para>
If you are not upgrading an existing system then skip to If you are not upgrading an existing system then skip to
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.47 2000/01/09 07:53:52 tgl Exp $ # $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.48 2000/01/16 20:04:51 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -24,7 +24,6 @@ ETAGS = @etags@ ...@@ -24,7 +24,6 @@ ETAGS = @etags@
XARGS = @xargs@ XARGS = @xargs@
all: all:
$(MAKE) lexverify
$(MAKE) -C utils all $(MAKE) -C utils all
$(MAKE) -C backend all $(MAKE) -C backend all
$(MAKE) -C interfaces all $(MAKE) -C interfaces all
...@@ -35,7 +34,6 @@ all: ...@@ -35,7 +34,6 @@ all:
fi fi
install: install:
$(MAKE) lexverify
$(MAKE) -C utils install $(MAKE) -C utils install
$(MAKE) -C backend install $(MAKE) -C backend install
$(MAKE) -C interfaces install $(MAKE) -C interfaces install
...@@ -43,19 +41,7 @@ install: ...@@ -43,19 +41,7 @@ install:
$(MAKE) -C pl install $(MAKE) -C pl install
cat ../register.txt cat ../register.txt
lexverify:
$(MAKE) -C lextest all
@if test ! -f lextest/lextest; then \
echo "";\
echo "You have a buggy version of flex. Read INSTALL and search for flex for a fix.";\
echo "";\
false;\
else \
true;\
fi
clean: clean:
$(MAKE) -C lextest clean
$(MAKE) -C utils clean $(MAKE) -C utils clean
$(MAKE) -C backend clean $(MAKE) -C backend clean
$(MAKE) -C interfaces clean $(MAKE) -C interfaces clean
...@@ -108,7 +94,6 @@ distclean: clean ...@@ -108,7 +94,6 @@ distclean: clean
test/regress/GNUmakefile test/regress/GNUmakefile
.DEFAULT: .DEFAULT:
$(MAKE) -C lextest $@
$(MAKE) -C utils $@ $(MAKE) -C utils $@
$(MAKE) -C backend $@ $(MAKE) -C backend $@
$(MAKE) -C interfaces $@ $(MAKE) -C interfaces $@
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for the bootstrap module # Makefile for the bootstrap module
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.19 1999/12/16 16:52:46 momjian Exp $ # $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.20 2000/01/16 20:04:53 petere Exp $
# #
# #
# We must build bootparse.c and bootscanner.c with yacc and lex and sed, # We must build bootparse.c and bootscanner.c with yacc and lex and sed,
...@@ -68,7 +68,7 @@ bootscanner.c: bootscanner.l ...@@ -68,7 +68,7 @@ bootscanner.c: bootscanner.l
rm -f lex.yy.c sedfile rm -f lex.yy.c sedfile
clean: clean:
rm -f SUBSYS.o $(OBJS) bootparse.c bootstrap_tokens.h bootscanner.c rm -f SUBSYS.o $(OBJS)
# And the garbage that might have been left behind by partial build: # And the garbage that might have been left behind by partial build:
rm -f y.tab.h y.tab.c y.output lex.yy.c rm -f y.tab.h y.tab.c y.output lex.yy.c
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.34 2000/01/15 02:59:28 petere Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.35 2000/01/16 20:04:54 petere Exp $
* *
* NOTES * NOTES
* See acl.h. * See acl.h.
...@@ -444,8 +444,8 @@ pg_aclcheck(char *relname, char *usename, AclMode mode) ...@@ -444,8 +444,8 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
} }
int32 int32
pg_ownercheck(char *usename, pg_ownercheck(const char *usename,
char *value, const char *value,
int cacheid) int cacheid)
{ {
HeapTuple tuple; HeapTuple tuple;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.27 2000/01/15 02:59:28 petere Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.28 2000/01/16 20:04:54 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
* Perhaps this should be in-line code in relopen(). * Perhaps this should be in-line code in relopen().
*/ */
char * char *
relpath(char *relname) relpath(const char *relname)
{ {
char *path; char *path;
size_t bufsize = 0; size_t bufsize = 0;
...@@ -52,7 +52,7 @@ relpath(char *relname) ...@@ -52,7 +52,7 @@ relpath(char *relname)
* XXX this is way bogus. -- pma * XXX this is way bogus. -- pma
*/ */
bool bool
IsSystemRelationName(char *relname) IsSystemRelationName(const char *relname)
{ {
if (relname[0] && relname[1] && relname[2]) if (relname[0] && relname[1] && relname[2])
return (relname[0] == 'p' && return (relname[0] == 'p' &&
...@@ -67,7 +67,7 @@ IsSystemRelationName(char *relname) ...@@ -67,7 +67,7 @@ IsSystemRelationName(char *relname)
* True iff name is the name of a shared system catalog relation. * True iff name is the name of a shared system catalog relation.
*/ */
bool bool
IsSharedSystemRelationName(char *relname) IsSharedSystemRelationName(const char *relname)
{ {
int i; int i;
......
This diff is collapsed.
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.126 2000/01/15 02:59:32 petere Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.127 2000/01/16 20:04:55 petere Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -114,7 +114,7 @@ static Node *doNegate(Node *n); ...@@ -114,7 +114,7 @@ static Node *doNegate(Node *n);
} }
%type <node> stmt, %type <node> stmt,
AddAttrStmt, ClosePortalStmt, AlterTableStmt, ClosePortalStmt,
CopyStmt, CreateStmt, CreateAsStmt, CreateSeqStmt, DefineStmt, DropStmt, CopyStmt, CreateStmt, CreateAsStmt, CreateSeqStmt, DefineStmt, DropStmt,
TruncateStmt, CommentStmt, TruncateStmt, CommentStmt,
ExtendStmt, FetchStmt, GrantStmt, CreateTrigStmt, DropTrigStmt, ExtendStmt, FetchStmt, GrantStmt, CreateTrigStmt, DropTrigStmt,
...@@ -130,6 +130,9 @@ static Node *doNegate(Node *n); ...@@ -130,6 +130,9 @@ static Node *doNegate(Node *n);
RuleActionStmtOrEmpty, ConstraintsSetStmt, RuleActionStmtOrEmpty, ConstraintsSetStmt,
CreateGroupStmt, AlterGroupStmt, DropGroupStmt CreateGroupStmt, AlterGroupStmt, DropGroupStmt
%type <node> alter_column_action
%type <ival> drop_behavior
%type <str> createdb_opt_location %type <str> createdb_opt_location
%type <ival> createdb_opt_encoding %type <ival> createdb_opt_encoding
...@@ -210,7 +213,7 @@ static Node *doNegate(Node *n); ...@@ -210,7 +213,7 @@ static Node *doNegate(Node *n);
%type <astmt> insert_rest %type <astmt> insert_rest
%type <node> OptTableElement, ConstraintElem %type <node> OptTableElement, ConstraintElem
%type <node> columnDef, alter_clause %type <node> columnDef
%type <defelt> def_elem %type <defelt> def_elem
%type <node> def_arg, columnElem, where_clause, %type <node> def_arg, columnElem, where_clause,
a_expr, a_expr_or_null, b_expr, com_expr, AexprConst, a_expr, a_expr_or_null, b_expr, com_expr, AexprConst,
...@@ -391,7 +394,7 @@ stmtmulti: stmtmulti ';' stmt ...@@ -391,7 +394,7 @@ stmtmulti: stmtmulti ';' stmt
} }
; ;
stmt : AddAttrStmt stmt : AlterTableStmt
| AlterGroupStmt | AlterGroupStmt
| AlterUserStmt | AlterUserStmt
| ClosePortalStmt | ClosePortalStmt
...@@ -797,41 +800,75 @@ constraints_set_mode: DEFERRED ...@@ -797,41 +800,75 @@ constraints_set_mode: DEFERRED
/***************************************************************************** /*****************************************************************************
* *
* QUERY : * ALTER TABLE variations
* addattr ( attr1 = type1 .. attrn = typen ) to <relname> [*]
* *
*****************************************************************************/ *****************************************************************************/
AddAttrStmt: ALTER TABLE relation_name opt_inh_star alter_clause AlterTableStmt:
/* ALTER TABLE <name> ADD [COLUMN] <coldef> */
ALTER TABLE relation_name opt_inh_star ADD opt_column columnDef
{ {
AddAttrStmt *n = makeNode(AddAttrStmt); AlterTableStmt *n = makeNode(AlterTableStmt);
n->subtype = 'A';
n->relname = $3; n->relname = $3;
n->inh = $4; n->inh = $4;
n->colDef = $5; n->def = $7;
$$ = (Node *)n; $$ = (Node *)n;
} }
; /* ALTER TABLE <name> ALTER [COLUMN] <colname> {SET DEFAULT <expr>|DROP DEFAULT} */
| ALTER TABLE relation_name opt_inh_star ALTER opt_column ColId alter_column_action
alter_clause: ADD opt_column columnDef
{ {
$$ = $3; AlterTableStmt *n = makeNode(AlterTableStmt);
n->subtype = 'T';
n->relname = $3;
n->inh = $4;
n->name = $7;
n->def = $8;
$$ = (Node *)n;
}
/* ALTER TABLE <name> DROP [COLUMN] <name> {RESTRICT|CASCADE} */
| ALTER TABLE relation_name opt_inh_star DROP opt_column ColId drop_behavior
{
AlterTableStmt *n = makeNode(AlterTableStmt);
n->subtype = 'D';
n->relname = $3;
n->inh = $4;
n->name = $7;
n->behavior = $8;
$$ = (Node *)n;
} }
| ADD '(' OptTableElementList ')' /* ALTER TABLE <name> ADD CONSTRAINT ... */
| ALTER TABLE relation_name opt_inh_star ADD TableConstraint
{ {
if (length($3) != 1) AlterTableStmt *n = makeNode(AlterTableStmt);
elog(ERROR,"ALTER TABLE/ADD() allows one column only"); n->subtype = 'A';
$$ = (Node *) lfirst($3); n->relname = $3;
n->inh = $4;
n->def = $6;
$$ = (Node *)n;
} }
| DROP opt_column ColId /* ALTER TABLE <name> DROP CONSTRAINT <name> {RESTRICT|CASCADE} */
{ elog(ERROR,"ALTER TABLE/DROP COLUMN not yet implemented"); } | ALTER TABLE relation_name opt_inh_star DROP CONSTRAINT name drop_behavior
| ALTER opt_column ColId SET DEFAULT a_expr {
{ elog(ERROR,"ALTER TABLE/ALTER COLUMN/SET DEFAULT not yet implemented"); } AlterTableStmt *n = makeNode(AlterTableStmt);
| ALTER opt_column ColId DROP DEFAULT n->relname = $3;
{ elog(ERROR,"ALTER TABLE/ALTER COLUMN/DROP DEFAULT not yet implemented"); } n->inh = $4;
| ADD ConstraintElem n->name = $7;
{ elog(ERROR,"ALTER TABLE/ADD CONSTRAINT not yet implemented"); } n->behavior = $8;
$$ = (Node *)n;
}
;
alter_column_action:
SET DEFAULT a_expr_or_null { $$ = $3; }
| DROP DEFAULT { $$ = NULL; }
; ;
drop_behavior: CASCADE { $$ = CASCADE; }
| RESTRICT { $$ = RESTRICT; }
;
/***************************************************************************** /*****************************************************************************
* *
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.79 2000/01/15 18:30:30 petere Exp $ * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.80 2000/01/16 20:04:56 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -270,24 +270,6 @@ ProcessUtility(Node *parsetree, ...@@ -270,24 +270,6 @@ ProcessUtility(Node *parsetree,
} }
break; break;
case T_AddAttrStmt:
{
AddAttrStmt *stmt = (AddAttrStmt *) parsetree;
PS_SET_STATUS(commandTag = "ADD");
CHECK_IF_ABORTED();
/*
* owner checking done in PerformAddAttribute (now
* recursive)
*/
PerformAddAttribute(stmt->relname,
userName,
stmt->inh,
(ColumnDef *) stmt->colDef);
}
break;
/* /*
* schema * schema
*/ */
...@@ -346,6 +328,44 @@ ProcessUtility(Node *parsetree, ...@@ -346,6 +328,44 @@ ProcessUtility(Node *parsetree,
} }
break; break;
/* various Alter Table forms */
case T_AlterTableStmt:
{
AlterTableStmt *stmt = (AlterTableStmt *) parsetree;
PS_SET_STATUS(commandTag = "ALTER TABLE");
CHECK_IF_ABORTED();
/*
* Some or all of these functions are recursive to cover inherited things,
* so permission checks are done there.
*/
switch(stmt->subtype)
{
case 'A': /* ADD COLUMN */
AlterTableAddColumn(stmt->relname, stmt->inh, (ColumnDef *) stmt->def);
break;
case 'T': /* ALTER COLUMN */
AlterTableAlterColumn(stmt->relname, stmt->inh, stmt->name, stmt->def);
break;
case 'D': /* ALTER DROP */
AlterTableDropColumn(stmt->relname, stmt->inh, stmt->name, stmt->behavior);
break;
case 'C': /* ADD CONSTRAINT */
AlterTableAddConstraint(stmt->relname, stmt->inh, stmt->def);
break;
case 'X': /* DROP CONSTRAINT */
AlterTableDropConstraint(stmt->relname, stmt->inh, stmt->name, stmt->behavior);
break;
default: /* oops */
elog(ERROR, "T_AlterTableStmt: unknown subtype");
break;
}
}
break;
case T_ChangeACLStmt: case T_ChangeACLStmt:
{ {
ChangeACLStmt *stmt = (ChangeACLStmt *) parsetree; ChangeACLStmt *stmt = (ChangeACLStmt *) parsetree;
......
...@@ -268,8 +268,9 @@ MainLoop(FILE *source, int encoding) ...@@ -268,8 +268,9 @@ MainLoop(FILE *source, int encoding)
/* colon -> substitute variable */ /* colon -> substitute variable */
/* we need to be on the watch for the '::' operator */ /* we need to be on the watch for the '::' operator */
else if (line[i] == ':' && !was_bslash && else if (line[i] == ':' && !was_bslash
strspn(line+i+thislen, VALID_VARIABLE_CHARS)>0 && strspn(line+i+thislen, VALID_VARIABLE_CHARS)>0
&& !(prevlen>0 && line[i-prevlen] == ':')
) )
{ {
size_t in_length, size_t in_length,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -545,6 +545,20 @@ AC_SUBST(DASH_N) ...@@ -545,6 +545,20 @@ AC_SUBST(DASH_N)
AC_SUBST(BACKSLASH_C) AC_SUBST(BACKSLASH_C)
AC_PROG_LEX AC_PROG_LEX
if test "$LEX" = "flex"; then
$LEX --version 2> /dev/null | grep -s '2\.5\.3' >& /dev/null
if test $? -eq 0 ; then
AC_MSG_WARN([
***
You have flex version 2.5.3, which is broken. Get version 2.5.4 or
a different lex.
(If you are using the official distribution of PostgreSQL then you
do not need to worry about this because the lexer files are
pre-generated. However, other software using flex is likely to be
broken as well.)
***])
fi
fi
AC_PROG_LN_S AC_PROG_LN_S
AC_PROG_MAKE_SET AC_PROG_MAKE_SET
AC_PROG_RANLIB AC_PROG_RANLIB
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * 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 @@ ...@@ -15,9 +15,9 @@
#include "access/tupdesc.h" #include "access/tupdesc.h"
extern char *relpath(char *relname); extern char *relpath(const char *relname);
extern bool IsSystemRelationName(char *relname); extern bool IsSystemRelationName(const char *relname);
extern bool IsSharedSystemRelationName(char *relname); extern bool IsSharedSystemRelationName(const char *relname);
extern Oid newoid(void); extern Oid newoid(void);
extern void fillatt(TupleDesc att); extern void fillatt(TupleDesc att);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * 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); ...@@ -38,12 +38,29 @@ extern void PerformPortalClose(char *name, CommandDest dest);
extern void PortalCleanup(Portal portal); extern void PortalCleanup(Portal portal);
/* /*
* PerformAddAttribute * ALTER TABLE variants
* Performs the POSTQUEL function ADD.
*/ */
extern void PerformAddAttribute(char *relationName, char *userName, extern void AlterTableAddColumn(const char *relationName,
bool inh, ColumnDef *colDef); 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); extern void LockTableCommand(LockStmt *lockstmt);
#endif /* COMMAND_H */ #endif /* COMMAND_H */
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * 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 ...@@ -145,7 +145,7 @@ typedef enum NodeTag
T_DeleteStmt, T_DeleteStmt,
T_UpdateStmt, T_UpdateStmt,
T_SelectStmt, T_SelectStmt,
T_AddAttrStmt, T_AlterTableStmt,
T_AggregateStmt, T_AggregateStmt,
T_ChangeACLStmt, T_ChangeACLStmt,
T_ClosePortalStmt, T_ClosePortalStmt,
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * 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 ...@@ -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; NodeTag type;
char *relname; /* the relation to add attr */ char subtype; /* A = add, T = alter, D = drop, C = add constr, X = drop constr */
bool inh; /* add recursively to children? */ char *relname; /* table to work on */
Node *colDef; /* the attribute definition */ bool inh; /* recursively on children? */
} AddAttrStmt; 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 * Change ACL Statement
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * 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 * NOTES
* For backward-compatability purposes we have to allow there * For backward-compatability purposes we have to allow there
...@@ -168,7 +168,7 @@ extern AclId get_grosysid(char *groname); ...@@ -168,7 +168,7 @@ extern AclId get_grosysid(char *groname);
extern char *get_groname(AclId grosysid); extern char *get_groname(AclId grosysid);
extern int32 pg_aclcheck(char *relname, char *usename, AclMode mode); 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, extern int32 pg_func_ownercheck(char *usename, char *funcname,
int nargs, Oid *arglist); int nargs, Oid *arglist);
extern int32 pg_aggr_ownercheck(char *usename, char *aggname, extern int32 pg_aggr_ownercheck(char *usename, char *aggname,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for the plpgsql shared object # Makefile for the plpgsql shared object
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/Makefile.in,v 1.18 1999/10/13 11:38:40 momjian Exp $ # $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/Makefile.in,v 1.19 2000/01/16 20:04:59 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -79,6 +79,6 @@ pl_scan.c: scan.l ...@@ -79,6 +79,6 @@ pl_scan.c: scan.l
clean: clean-shlib clean: clean-shlib
rm -f lib$(NAME).a rm -f lib$(NAME).a
rm -f *.o pl.tab.h pl_gram.c pl_scan.c rm -f *.o
# And the garbage that might have been left behind by partial build: # And the garbage that might have been left behind by partial build:
rm -f y.tab.c y.tab.h lex.yy.c rm -f y.tab.c y.tab.h lex.yy.c
#!/bin/sh #!/bin/sh
# #
# $Header: /cvsroot/pgsql/src/test/regress/Attic/run_check.sh,v 1.6 2000/01/09 20:54:36 tgl Exp $ # $Header: /cvsroot/pgsql/src/test/regress/Attic/run_check.sh,v 1.7 2000/01/16 20:05:00 petere Exp $
# ---------- # ----------
# Check call syntax # Check call syntax
...@@ -37,6 +37,16 @@ export LOGDIR ...@@ -37,6 +37,16 @@ export LOGDIR
export TIMDIR export TIMDIR
export PGPORT export PGPORT
# Needed by psql and pg_encoding (if you run multibyte).
# I hope this covers all platforms with shared libraries,
# otherwise feel free to cover your platform here as well.
if [ "$LD_LIBRARY_PATH" ]; then
old_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
LD_LIBRARY_PATH="$LIBDIR:$LD_LIBARY_PATH"
else
LD_LIBRARY_PATH="$LIBDIR"
fi
export LD_LIBRARY_PATH
# ---------- # ----------
# Get the commandline parameters # Get the commandline parameters
...@@ -111,6 +121,7 @@ trap ' echo "" ...@@ -111,6 +121,7 @@ trap ' echo ""
echo "" echo ""
fi fi
echo "" echo ""
LD_LIBRARY_PATH="$old_LD_LIBRARY_PATH"
exit 1 exit 1
' 2 15 ' 2 15
...@@ -434,5 +445,6 @@ done | tee run_check.out 2>&1 ...@@ -434,5 +445,6 @@ done | tee run_check.out 2>&1
echo "=============== Terminating regression postmaster ================" echo "=============== Terminating regression postmaster ================"
kill -15 $PMPID kill -15 $PMPID
LD_LIBRARY_PATH="$old_LD_LIBRARY_PATH"
exit 0 exit 0
...@@ -31,34 +31,39 @@ cd src ...@@ -31,34 +31,39 @@ cd src
./configure ./configure
# Generate parser's gram and lex files. # Generate parser's yacc and lex files
cd backend/parser cd backend/parser
rm -f gram.c parse.h scan.c rm -f gram.c parse.h scan.c
$MAKE gram.c parse.h scan.c $MAKE gram.c parse.h scan.c
cd ../..
# Generate bootstrap parser's yacc and lex files
cd backend/bootstrap
rm -f bootstrap_tokens.h bootparse.c bootscanner.c
$MAKE bootstrap_tokens.h bootparse.c bootscanner.c
cd ../.. cd ../..
# Generate ecpg preprocessor's gram and lex files. # Generate ecpg preprocessor's yacc and lex files
cd interfaces/ecpg/preproc cd interfaces/ecpg/preproc
rm -f preproc.c preproc.h pgc.c rm -f preproc.c preproc.h pgc.c
$MAKE preproc.c preproc.h pgc.c $MAKE preproc.c preproc.h pgc.c
cd ../../.. cd ../../..
# Generate plpgsql's yacc and lex files
cd pl/plpgsql
rm -rf pl_scan.c pl.tab.h pl_gram.c
$MAKE pl_scan.c pl.tab.h pl_gram.c
cd ../..
# Generate psql's help on SQL command from the SGML docs # Generate psql's help on SQL command from the SGML docs
cd bin/psql cd bin/psql
rm -f sql_help.h rm -f sql_help.h
$MAKE sql_help.h $MAKE sql_help.h
cd ../.. cd ../..
# Clean up # Clean up
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment