11
11
*
12
12
*
13
13
* IDENTIFICATION
14
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.165 2000/03/30 06: 02:36 thomas Exp $
14
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.166 2000/03/31 02:11:03 tgl Exp $
15
15
*
16
16
* HISTORY
17
17
* AUTHORDATEMAJOR EVENT
@@ -720,39 +720,30 @@ var_value: Sconst
720
720
}
721
721
| FCONST
722
722
{
723
- /* Floatingpumeric argument?
724
- * This recently changed to preserve "stringiness" until here ,
723
+ /* Floatingnumeric argument.
724
+ * This recently changed to preserve "stringiness",
725
725
* so we don't have any work to do at all. Nice.
726
726
* - thomas 2000-03-29
727
727
*/
728
728
$$ =$1 ;
729
729
}
730
730
| Iconst
731
731
{
732
- char *result;
733
732
char buf[64 ];
734
733
735
- /* Integerpumeric argument?
734
+ /* Integernumeric argument.
736
735
*/
737
- if (sprintf(buf," %d" ,$1 ) !=1 )
738
- {
739
- result = pstrdup(buf);
740
- }
741
- else
742
- elog (ERROR," Unable to convert constant to string (internal error)" );
743
-
744
- $$ = result;
736
+ sprintf (buf," %d" , $1 );
737
+ $$ = pstrdup(buf);
745
738
}
746
739
| name_list
747
740
{
748
741
List *n;
749
- int llen, slen =0 ;
742
+ int slen =0 ;
750
743
char *result;
751
744
752
- llen = length($1 );
753
-
754
745
/* List of words? Then concatenate together*/
755
- if (llen < 1 )
746
+ if ($1 == NIL )
756
747
elog (ERROR," SET must have at least one argument" );
757
748
758
749
foreach (n, $1 )
@@ -5300,7 +5291,7 @@ UserId: IDENT{ $$ = $1; };
5300
5291
* some of these keywords will have to be removed from this
5301
5292
* list due to shift/reduce conflicts in yacc. If so, move
5302
5293
* down to the ColLabel entity. - thomas 1997-11-06
5303
- * These show up as operators,ans will screw up the parsing if
5294
+ * These show up as operators,and will screw up the parsing if
5304
5295
* allowed as identifiers or labels.
5305
5296
* Thanks to Tom Lane for pointing this out. - thomas 2000-03-29
5306
5297
| BETWEEN{ $$ = "between"; }
@@ -5442,7 +5433,7 @@ ColId: IDENT{ $$ = $1; }
5442
5433
* Add other keywords to this list. Note that they appear here
5443
5434
* rather than in ColId if there was a shift/reduce conflict
5444
5435
* when used as a full identifier. - thomas 1997-11-06
5445
- * These show up as operators,ans will screw up the parsing if
5436
+ * These show up as operators,and will screw up the parsing if
5446
5437
* allowed as identifiers or labels.
5447
5438
* Thanks to Tom Lane for pointing this out. - thomas 2000-03-29
5448
5439
| ALL{ $$ = "all"; }
@@ -5452,7 +5443,7 @@ ColId: IDENT{ $$ = $1; }
5452
5443
| LIKE{ $$ = "like"; }
5453
5444
| NOT{ $$ = "not"; }
5454
5445
| NULLIF{ $$ = "nullif"; }
5455
- | NULL_P{ $$ = "null_p "; }
5446
+ | NULL_P{ $$ = "null "; }
5456
5447
| OR{ $$ = "or"; }
5457
5448
| UNION{ $$ = "union"; }
5458
5449
*/