Add ^ precidence.

This commit is contained in:
Bruce Momjian 1999-07-08 00:00:43 +00:00
parent 38ff52c379
commit 104d6c816e
3 changed files with 37 additions and 10 deletions

View File

@ -29,8 +29,10 @@ PARSER
* Select a[1] FROM test fails, it needs test.a[1]
* Array index references without table name cause problems
* Update table SET table.value = 3 fails
* Creating index of timestamp fails
* Creating index of TIMESTAMP fails, rename to DATETIME(Thomas)
* SELECT foo UNION SELECT foo is incorrectly simplified to SELECT foo
* INSERT ... SELECT ... GROUP BY groups by target columns not source columns
* CREATE TABLE test (a char(5) DEFAULT text '', b int4) fails on INSERT
VIEWS
@ -80,7 +82,8 @@ TYPES
* Large objects
o Fix large object mapping scheme, own typeid or reltype(Peter)
o Allow large text type to use large objects(Peter)
o Not to stuff everything as files in a single directory
o Not to stuff everything as files in a single directory, hash dirs
o Allow large object vacuuming
* Allow pg_descriptions when creating types, tables, columns, and functions
* Add IPv6 capability to INET/CIDR types
* Make a separate SERIAL type?
@ -90,6 +93,7 @@ TYPES
* Allow LOCALE on a per-column basis, default to ASCII
* Allow array on int8[]
* Remove Money type, add money formatting for decimal type
* Fix typein/out functions to not be user-callable
VIEWS
@ -132,6 +136,7 @@ CLIENTS
* Allow psql \copy to allow delimiters
* Add a function to return the last inserted oid, for use in psql scripts
* Allow psql to print nulls as distinct from ""(?)
* PQrequestCancel() be able to terminate backend waiting for lock
MISC
@ -182,17 +187,23 @@ INDEXES
a matching index
* Improve LIMIT processing by using index to limit rows processed
* Have optimizer take LIMIT into account when considering index scans
* Make index creation use psort code, because it is now faster(Vadim)
* Create more system table indexes for faster cache lookups
* fix indexscan() so it does leak memory by not requiring caller to free
* Improve _bt_binsrch() to handle equal keys better, remove _bt_firsteq()(Tom)
CACHE
* Cache most recent query plan(s?)
* Shared catalog cache, reduce lseek()'s by caching table size in shared area
* elog() flushes cache, try invalidating just entries from current xact,
perhaps using invalidation cache
MISC
* Allow compression of log and meta data
* Update pg_statistic table to remove operator column
* Make index creation use psort code, because it is now faster(Vadim)
* Allow char() not to use variable-sized header to reduce disk size
* Do async I/O to do better read-ahead of data
* Fix memory exhaustion when using many OR's
@ -201,15 +212,15 @@ MISC
* Use mmap() rather than SYSV shared memory(?)
* Process const = const parts of OR clause in separate pass
* Make oid use oidin/oidout not int4in/int4out in pg_type.h
* Create more system table indexes for faster cache lookups
* Improve Subplan list handling
* Allow Subplans to use efficient joins(hash, merge) with upper variable
* use fmgr_info()/fmgr_faddr() instead of fmgr() calls in high-traffic
places, like GROUP BY, UNIQUE, index processing, etc.
* improve dynamic memory allocation by introducing tuple-context memory
allocation
* fix indexscan() so it does leak memory by not requiring caller to free
* fix memory leak in cache code when non-existant table is refer
* fix memory leak in cache code when non-existant table is referenced
* In WHERE x=3 AND x=y, add y=3
* pass atttypmod through parser in more cases(Bruce)
SOURCE CODE
-----------

View File

@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.86 1999/07/04 04:55:59 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.87 1999/07/08 00:00:42 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@ -349,7 +349,7 @@ Oid param_type(int t); /* used in parse_expr.c */
%nonassoc NULL_P
%nonassoc IS
%left '+' '-'
%left '*' '/' '%'
%left '*' '/' '%' '^'
%left '|' /* this is the relation union op, not logical or */
/* Unary Operators */
%right ':'
@ -973,6 +973,8 @@ default_expr: AexprConst
{ $$ = nconc( $1, lcons( makeString( "%"), $3)); }
| default_expr '*' default_expr
{ $$ = nconc( $1, lcons( makeString( "*"), $3)); }
| default_expr '^' default_expr
{ $$ = nconc( $1, lcons( makeString( "^"), $3)); }
| default_expr '=' default_expr
{ elog(ERROR,"boolean expressions not supported in DEFAULT"); }
| default_expr '<' default_expr
@ -1121,6 +1123,8 @@ constraint_expr: AexprConst
{ $$ = nconc( $1, lcons( makeString( "%"), $3)); }
| constraint_expr '*' constraint_expr
{ $$ = nconc( $1, lcons( makeString( "*"), $3)); }
| constraint_expr '^' constraint_expr
{ $$ = nconc( $1, lcons( makeString( "^"), $3)); }
| constraint_expr '=' constraint_expr
{ $$ = nconc( $1, lcons( makeString( "="), $3)); }
| constraint_expr '<' constraint_expr
@ -3641,8 +3645,12 @@ a_expr: attr opt_indirection
{ $$ = doNegate($2); }
| '%' a_expr
{ $$ = makeA_Expr(OP, "%", NULL, $2); }
| '^' a_expr
{ $$ = makeA_Expr(OP, "^", NULL, $2); }
| a_expr '%'
{ $$ = makeA_Expr(OP, "%", $1, NULL); }
| a_expr '^'
{ $$ = makeA_Expr(OP, "^", $1, NULL); }
| a_expr '+' a_expr
{ $$ = makeA_Expr(OP, "+", $1, $3); }
| a_expr '-' a_expr
@ -3653,6 +3661,8 @@ a_expr: attr opt_indirection
{ $$ = makeA_Expr(OP, "%", $1, $3); }
| a_expr '*' a_expr
{ $$ = makeA_Expr(OP, "*", $1, $3); }
| a_expr '^' a_expr
{ $$ = makeA_Expr(OP, "^", $1, $3); }
| a_expr '<' a_expr
{ $$ = makeA_Expr(OP, "<", $1, $3); }
| a_expr '>' a_expr
@ -4302,8 +4312,12 @@ b_expr: attr opt_indirection
{ $$ = doNegate($2); }
| '%' b_expr
{ $$ = makeA_Expr(OP, "%", NULL, $2); }
| '^' b_expr
{ $$ = makeA_Expr(OP, "^", NULL, $2); }
| b_expr '%'
{ $$ = makeA_Expr(OP, "%", $1, NULL); }
| b_expr '^'
{ $$ = makeA_Expr(OP, "^", $1, NULL); }
| b_expr '+' b_expr
{ $$ = makeA_Expr(OP, "+", $1, $3); }
| b_expr '-' b_expr
@ -4312,6 +4326,8 @@ b_expr: attr opt_indirection
{ $$ = makeA_Expr(OP, "/", $1, $3); }
| b_expr '%' b_expr
{ $$ = makeA_Expr(OP, "%", $1, $3); }
| b_expr '^' b_expr
{ $$ = makeA_Expr(OP, "^", $1, $3); }
| b_expr '*' b_expr
{ $$ = makeA_Expr(OP, "*", $1, $3); }
| ':' b_expr

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.49 1999/05/12 07:12:51 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.50 1999/07/08 00:00:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -155,7 +155,7 @@ identifier {letter}{letter_or_digit}*
typecast "::"
self [,()\[\].;$\:\+\-\*\/\%\<\>\=\|]
self [,()\[\].;$\:\+\-\*\/\%\^\<\>\=\|]
op_and_self [\~\!\@\#\^\&\|\`\?\$\:\+\-\*\/\%\<\>\=]
operator {op_and_self}+