summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/nodes/outfuncs.c10
-rw-r--r--src/backend/parser/analyze.c3
-rw-r--r--src/backend/parser/gram.y36
3 files changed, 15 insertions, 34 deletions
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index 2999c4263b1..f6fed845069 100644
--- a/src/backend/nodes/outfuncs.c
+++ b/src/backend/nodes/outfuncs.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.121 2000/07/12 02:37:06 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.122 2000/07/15 00:01:37 tgl Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
@@ -139,9 +139,9 @@ _outIndexStmt(StringInfo str, IndexStmt *node)
appendStringInfo(str, " :rangetable ");
_outNode(str, node->rangetable);
- appendStringInfo(str, " :lossy %s :unique %s ",
- node->lossy ? "true" : "false",
- node->unique ? "true" : "false");
+ appendStringInfo(str, " :unique %s :primary %s ",
+ node->unique ? "true" : "false",
+ node->primary ? "true" : "false");
}
static void
@@ -210,8 +210,6 @@ _outIndexElem(StringInfo str, IndexElem *node)
_outNode(str, node->args);
appendStringInfo(str, " :class ");
_outToken(str, node->class);
- appendStringInfo(str, " :typename ");
- _outNode(str, node->typename);
}
static void
diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c
index 1d1cf7acf48..b5305edb54b 100644
--- a/src/backend/parser/analyze.c
+++ b/src/backend/parser/analyze.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: analyze.c,v 1.150 2000/07/14 15:43:32 thomas Exp $
+ * $Id: analyze.c,v 1.151 2000/07/15 00:01:41 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -947,7 +947,6 @@ transformCreateStmt(ParseState *pstate, CreateStmt *stmt)
iparam->name = pstrdup(column->colname);
iparam->args = NIL;
iparam->class = NULL;
- iparam->typename = NULL;
index->indexParams = lappend(index->indexParams, iparam);
if (index->idxname == NULL)
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index cf1f15ba4e5..16bac38748a 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.178 2000/07/14 15:43:32 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.179 2000/07/15 00:01:41 tgl Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -250,7 +250,7 @@ static void doNegateFloat(Value *v);
%type <target> target_el, update_target_el
%type <paramno> ParamNo
-%type <typnam> Typename, opt_type, SimpleTypename, ConstTypename
+%type <typnam> Typename, SimpleTypename, ConstTypename
Generic, Numeric, Character, ConstDatetime, ConstInterval, Bit
%type <str> typename, generic, numeric, character, datetime, bit
%type <str> extract_arg
@@ -1778,7 +1778,7 @@ TriggerFuncArg: ICONST
}
| FCONST { $$ = $1; }
| Sconst { $$ = $1; }
- | IDENT { $$ = $1; }
+ | ColId { $$ = $1; }
;
OptConstrFromTable: /* Empty */
@@ -2315,8 +2315,6 @@ RevokeStmt: REVOKE privileges ON relation_name_list FROM grantee
IndexStmt: CREATE index_opt_unique INDEX index_name ON relation_name
access_method_clause '(' index_params ')' opt_with
{
- /* should check that access_method is valid,
- etc ... but doesn't */
IndexStmt *n = makeNode(IndexStmt);
n->unique = $2;
n->idxname = $4;
@@ -2345,37 +2343,24 @@ index_list: index_list ',' index_elem { $$ = lappend($1, $3); }
| index_elem { $$ = lcons($1, NIL); }
;
-func_index: func_name '(' name_list ')' opt_type opt_class
+func_index: func_name '(' name_list ')' opt_class
{
$$ = makeNode(IndexElem);
$$->name = $1;
$$->args = $3;
- $$->class = $6;
- $$->typename = $5;
+ $$->class = $5;
}
;
-index_elem: attr_name opt_type opt_class
+index_elem: attr_name opt_class
{
$$ = makeNode(IndexElem);
$$->name = $1;
$$->args = NIL;
- $$->class = $3;
- $$->typename = $2;
+ $$->class = $2;
}
;
-opt_type: ':' Typename { $$ = $2; }
- | FOR Typename { $$ = $2; }
- | /*EMPTY*/ { $$ = NULL; }
- ;
-
-/* opt_class "WITH class" conflicts with preceeding opt_type
- * for Typename of "TIMESTAMP WITH TIME ZONE"
- * So, remove "WITH class" from the syntax. OK??
- * - thomas 1997-10-12
- * | WITH class { $$ = $2; }
- */
opt_class: class {
/*
* Release 7.0 removed network_ops, timespan_ops, and datetime_ops,
@@ -5352,9 +5337,9 @@ relation_name: SpecialRuleRelation
;
database_name: ColId { $$ = $1; };
-access_method: IDENT { $$ = $1; };
+access_method: ColId { $$ = $1; };
attr_name: ColId { $$ = $1; };
-class: IDENT { $$ = $1; };
+class: ColId { $$ = $1; };
index_name: ColId { $$ = $1; };
/* Functions
@@ -5365,7 +5350,6 @@ name: ColId { $$ = $1; };
func_name: ColId { $$ = xlateSqlFunc($1); };
file_name: Sconst { $$ = $1; };
-/* NOT USED recipe_name: IDENT { $$ = $1; };*/
/* Constants
* Include TRUE/FALSE for SQL3 support. - thomas 1997-10-24
@@ -5453,7 +5437,7 @@ ParamNo: PARAM opt_indirection
Iconst: ICONST { $$ = $1; };
Sconst: SCONST { $$ = $1; };
-UserId: IDENT { $$ = $1; };
+UserId: ColId { $$ = $1; };
/* Column identifier
* Include date/time keywords as SQL92 extension.