Commit 3e20a726 authored by Peter Eisentraut's avatar Peter Eisentraut

Make all valid uses of the COLLATE clause yield the same result: a syntax

error.  There is no point in providing some kind of forward compatibility
now, because no one can tell what a future implementation will look like.
parent 4060f075
......@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.430 2003/08/22 20:34:33 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.431 2003/09/06 14:01:51 petere Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
......@@ -294,7 +294,7 @@ static void doNegateFloat(Value *v);
Bit ConstBit BitWithLength BitWithoutLength
%type <str> character
%type <str> extract_arg
%type <str> opt_charset opt_collate
%type <str> opt_charset
%type <ival> opt_numeric opt_decimal
%type <boolean> opt_varying opt_timezone
......@@ -441,7 +441,6 @@ static void doNegateFloat(Value *v);
%right UMINUS
%left '[' ']'
%left '(' ')'
%left COLLATE
%left TYPECAST
%left '.'
/*
......@@ -1461,19 +1460,13 @@ TableElement:
| TableConstraint { $$ = $1; }
;
columnDef: ColId Typename ColQualList opt_collate
columnDef: ColId Typename ColQualList
{
ColumnDef *n = makeNode(ColumnDef);
n->colname = $1;
n->typename = $2;
n->constraints = $3;
n->is_local = true;
if ($4 != NULL)
ereport(NOTICE,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("CREATE TABLE / COLLATE is not yet implemented; clause ignored")));
$$ = (Node *)n;
}
;
......@@ -3843,17 +3836,12 @@ DropdbStmt: DROP DATABASE database_name
*****************************************************************************/
CreateDomainStmt:
CREATE DOMAIN_P any_name opt_as Typename ColQualList opt_collate
CREATE DOMAIN_P any_name opt_as Typename ColQualList
{
CreateDomainStmt *n = makeNode(CreateDomainStmt);
n->domainname = $3;
n->typename = $5;
n->constraints = $6;
if ($7 != NULL)
ereport(NOTICE,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("CREATE DOMAIN / COLLATE is not yet implemented; clause ignored")));
$$ = (Node *)n;
}
;
......@@ -5463,11 +5451,6 @@ opt_charset:
| /*EMPTY*/ { $$ = NULL; }
;
opt_collate:
COLLATE ColId { $$ = $2; }
| /*EMPTY*/ { $$ = NULL; }
;
ConstDatetime:
TIMESTAMP '(' Iconst ')' opt_timezone
{
......@@ -5753,15 +5736,6 @@ qual_all_Op:
a_expr: c_expr { $$ = $1; }
| a_expr TYPECAST Typename
{ $$ = makeTypeCast($1, $3); }
| a_expr COLLATE ColId
{
FuncCall *n = makeNode(FuncCall);
n->funcname = SystemFuncName($3);
n->args = makeList1($1);
n->agg_star = FALSE;
n->agg_distinct = FALSE;
$$ = (Node *) n;
}
| a_expr AT TIME ZONE c_expr
{
FuncCall *n = makeNode(FuncCall);
......
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