提交 104d6c81 编写于 作者: B Bruce Momjian

Add ^ precidence.

上级 38ff52c3
...@@ -29,8 +29,10 @@ PARSER ...@@ -29,8 +29,10 @@ PARSER
* Select a[1] FROM test fails, it needs test.a[1] * Select a[1] FROM test fails, it needs test.a[1]
* Array index references without table name cause problems * Array index references without table name cause problems
* Update table SET table.value = 3 fails * 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 * 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 VIEWS
...@@ -80,7 +82,8 @@ TYPES ...@@ -80,7 +82,8 @@ TYPES
* Large objects * Large objects
o Fix large object mapping scheme, own typeid or reltype(Peter) o Fix large object mapping scheme, own typeid or reltype(Peter)
o Allow large text type to use large objects(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 * Allow pg_descriptions when creating types, tables, columns, and functions
* Add IPv6 capability to INET/CIDR types * Add IPv6 capability to INET/CIDR types
* Make a separate SERIAL type? * Make a separate SERIAL type?
...@@ -90,6 +93,7 @@ TYPES ...@@ -90,6 +93,7 @@ TYPES
* Allow LOCALE on a per-column basis, default to ASCII * Allow LOCALE on a per-column basis, default to ASCII
* Allow array on int8[] * Allow array on int8[]
* Remove Money type, add money formatting for decimal type * Remove Money type, add money formatting for decimal type
* Fix typein/out functions to not be user-callable
VIEWS VIEWS
...@@ -132,6 +136,7 @@ CLIENTS ...@@ -132,6 +136,7 @@ CLIENTS
* Allow psql \copy to allow delimiters * Allow psql \copy to allow delimiters
* Add a function to return the last inserted oid, for use in psql scripts * Add a function to return the last inserted oid, for use in psql scripts
* Allow psql to print nulls as distinct from ""(?) * Allow psql to print nulls as distinct from ""(?)
* PQrequestCancel() be able to terminate backend waiting for lock
MISC MISC
...@@ -182,17 +187,23 @@ INDEXES ...@@ -182,17 +187,23 @@ INDEXES
a matching index a matching index
* Improve LIMIT processing by using index to limit rows processed * Improve LIMIT processing by using index to limit rows processed
* Have optimizer take LIMIT into account when considering index scans * 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
* Cache most recent query plan(s?) * Cache most recent query plan(s?)
* Shared catalog cache, reduce lseek()'s by caching table size in shared area * 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 MISC
* Allow compression of log and meta data * Allow compression of log and meta data
* Update pg_statistic table to remove operator column * 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 * Allow char() not to use variable-sized header to reduce disk size
* Do async I/O to do better read-ahead of data * Do async I/O to do better read-ahead of data
* Fix memory exhaustion when using many OR's * Fix memory exhaustion when using many OR's
...@@ -201,15 +212,15 @@ MISC ...@@ -201,15 +212,15 @@ MISC
* Use mmap() rather than SYSV shared memory(?) * Use mmap() rather than SYSV shared memory(?)
* Process const = const parts of OR clause in separate pass * Process const = const parts of OR clause in separate pass
* Make oid use oidin/oidout not int4in/int4out in pg_type.h * 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 * Improve Subplan list handling
* Allow Subplans to use efficient joins(hash, merge) with upper variable * Allow Subplans to use efficient joins(hash, merge) with upper variable
* use fmgr_info()/fmgr_faddr() instead of fmgr() calls in high-traffic * use fmgr_info()/fmgr_faddr() instead of fmgr() calls in high-traffic
places, like GROUP BY, UNIQUE, index processing, etc. places, like GROUP BY, UNIQUE, index processing, etc.
* improve dynamic memory allocation by introducing tuple-context memory * improve dynamic memory allocation by introducing tuple-context memory
allocation 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 referenced
* fix memory leak in cache code when non-existant table is refer * In WHERE x=3 AND x=y, add y=3
* pass atttypmod through parser in more cases(Bruce)
SOURCE CODE SOURCE CODE
----------- -----------
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * 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 * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -349,7 +349,7 @@ Oid param_type(int t); /* used in parse_expr.c */ ...@@ -349,7 +349,7 @@ Oid param_type(int t); /* used in parse_expr.c */
%nonassoc NULL_P %nonassoc NULL_P
%nonassoc IS %nonassoc IS
%left '+' '-' %left '+' '-'
%left '*' '/' '%' %left '*' '/' '%' '^'
%left '|' /* this is the relation union op, not logical or */ %left '|' /* this is the relation union op, not logical or */
/* Unary Operators */ /* Unary Operators */
%right ':' %right ':'
...@@ -973,6 +973,8 @@ default_expr: AexprConst ...@@ -973,6 +973,8 @@ default_expr: AexprConst
{ $$ = nconc( $1, lcons( makeString( "%"), $3)); } { $$ = nconc( $1, lcons( makeString( "%"), $3)); }
| default_expr '*' default_expr | default_expr '*' default_expr
{ $$ = nconc( $1, lcons( makeString( "*"), $3)); } { $$ = nconc( $1, lcons( makeString( "*"), $3)); }
| default_expr '^' default_expr
{ $$ = nconc( $1, lcons( makeString( "^"), $3)); }
| default_expr '=' default_expr | default_expr '=' default_expr
{ elog(ERROR,"boolean expressions not supported in DEFAULT"); } { elog(ERROR,"boolean expressions not supported in DEFAULT"); }
| default_expr '<' default_expr | default_expr '<' default_expr
...@@ -1121,6 +1123,8 @@ constraint_expr: AexprConst ...@@ -1121,6 +1123,8 @@ constraint_expr: AexprConst
{ $$ = nconc( $1, lcons( makeString( "%"), $3)); } { $$ = nconc( $1, lcons( makeString( "%"), $3)); }
| constraint_expr '*' constraint_expr | constraint_expr '*' constraint_expr
{ $$ = nconc( $1, lcons( makeString( "*"), $3)); } { $$ = nconc( $1, lcons( makeString( "*"), $3)); }
| constraint_expr '^' constraint_expr
{ $$ = nconc( $1, lcons( makeString( "^"), $3)); }
| constraint_expr '=' constraint_expr | constraint_expr '=' constraint_expr
{ $$ = nconc( $1, lcons( makeString( "="), $3)); } { $$ = nconc( $1, lcons( makeString( "="), $3)); }
| constraint_expr '<' constraint_expr | constraint_expr '<' constraint_expr
...@@ -3641,8 +3645,12 @@ a_expr: attr opt_indirection ...@@ -3641,8 +3645,12 @@ a_expr: attr opt_indirection
{ $$ = doNegate($2); } { $$ = doNegate($2); }
| '%' a_expr | '%' a_expr
{ $$ = makeA_Expr(OP, "%", NULL, $2); } { $$ = makeA_Expr(OP, "%", NULL, $2); }
| '^' a_expr
{ $$ = makeA_Expr(OP, "^", NULL, $2); }
| a_expr '%' | a_expr '%'
{ $$ = makeA_Expr(OP, "%", $1, NULL); } { $$ = makeA_Expr(OP, "%", $1, NULL); }
| a_expr '^'
{ $$ = makeA_Expr(OP, "^", $1, NULL); }
| a_expr '+' a_expr | a_expr '+' a_expr
{ $$ = makeA_Expr(OP, "+", $1, $3); } { $$ = makeA_Expr(OP, "+", $1, $3); }
| a_expr '-' a_expr | a_expr '-' a_expr
...@@ -3653,6 +3661,8 @@ a_expr: attr opt_indirection ...@@ -3653,6 +3661,8 @@ a_expr: attr opt_indirection
{ $$ = makeA_Expr(OP, "%", $1, $3); } { $$ = makeA_Expr(OP, "%", $1, $3); }
| a_expr '*' a_expr | a_expr '*' a_expr
{ $$ = makeA_Expr(OP, "*", $1, $3); } { $$ = makeA_Expr(OP, "*", $1, $3); }
| a_expr '^' a_expr
{ $$ = makeA_Expr(OP, "^", $1, $3); }
| a_expr '<' a_expr | a_expr '<' a_expr
{ $$ = makeA_Expr(OP, "<", $1, $3); } { $$ = makeA_Expr(OP, "<", $1, $3); }
| a_expr '>' a_expr | a_expr '>' a_expr
...@@ -4302,8 +4312,12 @@ b_expr: attr opt_indirection ...@@ -4302,8 +4312,12 @@ b_expr: attr opt_indirection
{ $$ = doNegate($2); } { $$ = doNegate($2); }
| '%' b_expr | '%' b_expr
{ $$ = makeA_Expr(OP, "%", NULL, $2); } { $$ = makeA_Expr(OP, "%", NULL, $2); }
| '^' b_expr
{ $$ = makeA_Expr(OP, "^", NULL, $2); }
| b_expr '%' | b_expr '%'
{ $$ = makeA_Expr(OP, "%", $1, NULL); } { $$ = makeA_Expr(OP, "%", $1, NULL); }
| b_expr '^'
{ $$ = makeA_Expr(OP, "^", $1, NULL); }
| b_expr '+' b_expr | b_expr '+' b_expr
{ $$ = makeA_Expr(OP, "+", $1, $3); } { $$ = makeA_Expr(OP, "+", $1, $3); }
| b_expr '-' b_expr | b_expr '-' b_expr
...@@ -4312,6 +4326,8 @@ b_expr: attr opt_indirection ...@@ -4312,6 +4326,8 @@ b_expr: attr opt_indirection
{ $$ = makeA_Expr(OP, "/", $1, $3); } { $$ = makeA_Expr(OP, "/", $1, $3); }
| b_expr '%' b_expr | b_expr '%' b_expr
{ $$ = makeA_Expr(OP, "%", $1, $3); } { $$ = makeA_Expr(OP, "%", $1, $3); }
| b_expr '^' b_expr
{ $$ = makeA_Expr(OP, "^", $1, $3); }
| b_expr '*' b_expr | b_expr '*' b_expr
{ $$ = makeA_Expr(OP, "*", $1, $3); } { $$ = makeA_Expr(OP, "*", $1, $3); }
| ':' b_expr | ':' b_expr
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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}* ...@@ -155,7 +155,7 @@ identifier {letter}{letter_or_digit}*
typecast "::" typecast "::"
self [,()\[\].;$\:\+\-\*\/\%\<\>\=\|] self [,()\[\].;$\:\+\-\*\/\%\^\<\>\=\|]
op_and_self [\~\!\@\#\^\&\|\`\?\$\:\+\-\*\/\%\<\>\=] op_and_self [\~\!\@\#\^\&\|\`\?\$\:\+\-\*\/\%\<\>\=]
operator {op_and_self}+ operator {op_and_self}+
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册