aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser
Commit message (Collapse)AuthorAge
* Remove bogus code in oper_exact --- if it didn't find an exactTom Lane1999-08-23
| | | | | | | | | match then it tried for a self-commutative operator with the reversed input data types. This is pretty silly; there could never be such an operator, except maybe in binary-compatible-type scenarios, and we have oper_inexact for that. Besides which, the oprsanity regress test would complain about such an operator. Remove nonfunctional code and simplify routine calling convention accordingly.
* Further planner/optimizer cleanups. Move all set_tlist_referencesTom Lane1999-08-22
| | | | | | | | | | and fix_opids processing to a single recursive pass over the plan tree executed at the very tail end of planning, rather than haphazardly here and there at different places. Now that tlist Vars do not get modified until the very end, it's possible to get rid of the klugy var_equal and match_varid partial-matching routines, and just use plain equal() throughout the optimizer. This is a step towards allowing merge and hash joins to be done on expressions instead of only Vars ...
* Major revision of sort-node handling: push knowledge of queryTom Lane1999-08-21
| | | | | | | | | | | | | sort order down into planner, instead of handling it only at the very top level of the planner. This fixes many things. An explicit sort is now avoided if there is a cheaper alternative (typically an indexscan) not only for ORDER BY, but also for the internal sort of GROUP BY. It works even when there is no other reason (such as a WHERE condition) to consider the indexscan. It works for indexes on functions. It works for indexes on functions, backwards. It's just so cool... CAUTION: I have changed the representation of SortClause nodes, therefore THIS UPDATE BREAKS STORED RULES. You will need to initdb.
* Old multi-byte bug. Forgot to rename #ifdef MB to #ifdef MULTIBYTETatsuo Ishii1999-08-18
| | | | Now SET NAMES working again...
* Small updates to #include lists for pending optimizer checkin.Tom Lane1999-08-16
|
* Move funcid_get_rettype() to lsyscache.Tom Lane1999-08-16
|
* Repair the check for redundant UNIQUE and PRIMARY KEY indices.Thomas G. Lockhart1999-08-15
| | | | | Also, improve it so that it checks for multi-column constraints. Thanks to Mark Dalphin <mdalphin@amgen.com> for reporting the problem.
* Revise parse_coerce() to handle coercion of int and floatTom Lane1999-08-05
| | | | | constants, not only string constants, at parse time. Get rid of parser_typecast2(), which is bogus and redundant...
* Allow a_expr not just AexprConst in the right-hand list ofTom Lane1999-07-28
| | | | | IN and NOT IN operators. Rewrite grotty implementation of IN-list parsing ... look Ma, no global variable ...
* First cut at doing LIKE/regex indexing optimization inTom Lane1999-07-27
| | | | | | | | | | | | | | | | | | optimizer rather than parser. This has many advantages, such as not getting fooled by chance uses of operator names ~ and ~~ (the operators are identified by OID now), and not creating useless comparison operations in contexts where the comparisons will not actually be used as indexquals. The new code also recognizes exact-match LIKE and regex patterns, and produces an = indexqual instead of >= and <=. This change does NOT fix the problem with non-ASCII locales: the code still doesn't know how to generate an upper bound indexqual for non-ASCII collation order. But it's no worse than before, just the same deficiency in a different place... Also, dike out loc_restrictinfo fields in Plan nodes. These were doing nothing useful in the absence of 'expensive functions' optimization, and they took a considerable amount of processing to fill in.
* Complain about INSERT ... SELECT ... ORDER BY, which we do notTom Lane1999-07-20
| | | | | | support, but which the grammar was accepting. Also, fix several bugs having to do with failure to copy fields up from a subselect to a select or insert node.
* Rewrite parser's handling of INSERT ... SELECT so that processingTom Lane1999-07-19
| | | | | | | | | of the SELECT part of the statement is just like a plain SELECT. All INSERT-specific processing happens after the SELECT parsing is done. This eliminates many problems, e.g. INSERT ... SELECT ... GROUP BY using the wrong column labels. Ensure that DEFAULT clauses are coerced to the target column type, whether or not stored clause produces the right type. Substantial cleanup of parser's array support.
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-17
|
* Add config.h as needed.Bruce Momjian1999-07-17
|
* Support subscripts on bare column names.Tom Lane1999-07-16
|
* Allow bare column names to be subscripted as arrays. ThisTom Lane1999-07-16
| | | | | | | | | | | | | | | creates a reduce/reduce conflict, which I resolved by changing the 'AexprConst -> Typename Sconst' rule to 'AexprConst -> SimpleTypename Sconst'. In other words, a subscripted type declaration can't be used in that syntax any longer. This seems a small price to pay for not having to qualify subscripted columns anymore. Other cleanups: rename res_target_list to update_target_list, and remove productions for variants that are not legal in an UPDATE target list; rename res_target_list2 to plain target_list; delete position_expr in favor of using b_expr in that production; merge opt_indirection into attr nonterminal, since there are no places where an unsubscripted attr is wanted; fix typos in Param support; change case_arg so that an arbitrary a_expr is allowed, not only a column name.
* Final cleanup.Bruce Momjian1999-07-16
|
* Remove unused #includes in *.c files.Bruce Momjian1999-07-15
|
* Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian1999-07-15
|
* Remove S*I comments from Stephan.Bruce Momjian1999-07-13
|
* Ignore resjunk targetlist entries when matching arguments toTom Lane1999-07-11
| | | | | a SubLink with the subplan's targetlist. This fixes a problem seen with, for example, a subselect that uses GROUP BY.
* Make ^ precidence greater than *.Bruce Momjian1999-07-09
|
* Add ^ precidence.Bruce Momjian1999-07-08
|
* Clarify maximum tuple and max attribute lengths.Bruce Momjian1999-07-04
|
* Fix to prevent too large tuple from being created.Bruce Momjian1999-07-03
|
* On second thought, expression_tree_walker should handle bareTom Lane1999-06-21
| | | | SubLink nodes after all ...
* My first chosen victim for expression_tree_walker conversionTom Lane1999-06-19
| | | | | | | | | | | | is parse_aggs.c. This fixes its failure to cope with (at least) CaseExpr and ArrayRef nodes, which is the reason why both of these fail in 6.5: select coalesce(f1,0) from int4_tbl group by f1; ERROR: Illegal use of aggregates or non-group column in target list select sentence.words[0] from sentence group by sentence.words[0]; ERROR: Illegal use of aggregates or non-group column in target list The array case still fails, but at least it's not parse_agg's fault anymore ... considering that we now support CASE officially, I think it's important to fix the first example ...
* Defend against function calls with more than 8 arguments (codeTom Lane1999-06-17
| | | | | used to overrun its fixed-size arrays before detecting error; not cool). Also, replace uses of magic constant '8' with 'MAXFARGS'.
* Repair recently-introduced error in makeIndexable for LIKE:Tom Lane1999-06-07
| | | | | | a non-leading % would be put into the >=/<= patterns. Also, repair longstanding confusion about whether %% means a literal %%. The SQL92 doesn't say any such thing, and textlike() knows that, but gram.y didn't.
* Instead of failing when the constructed name for a sequence,Tom Lane1999-06-05
| | | | index, etc is too long, truncate until it fits.
* Avoid redundant SysCache searches in coerce_type, for anotherTom Lane1999-05-29
| | | | few percent speedup in INSERT...
* Make functions static or NOT_USED as appropriate.Bruce Momjian1999-05-26
|
* Make 0x007f -> (unsigned)0x7f to make pgindent happy.Bruce Momjian1999-05-25
|
* pgindent run over code.Bruce Momjian1999-05-25
|
* Do not assign output columns to junk attributes created fromTom Lane1999-05-23
| | | | GROUP BY or ORDER BY expressions in INSERT ... SELECT.
* Detect case of invalid use of GROUP BY when there are noTom Lane1999-05-23
| | | | | | | aggregate functions, as in select a, b from foo group by a; The ungrouped reference to b is not kosher, but formerly we neglected to check this unless there was an aggregate function somewhere in the query.
* Fix for select 1;select 2 without trailing semi.Bruce Momjian1999-05-22
|
* Fix for DEFAULT ''.Bruce Momjian1999-05-22
|
* Make postgres prompt backend>, and remove PARSEDEBUG.Bruce Momjian1999-05-22
|
* Fix typo and attempt default fix.Bruce Momjian1999-05-21
|
* Treat {} as special regex too.Bruce Momjian1999-05-21
|
* Fix problem with | in ~ comparison using index.Bruce Momjian1999-05-21
|
* Fixed shift/reduce conflictJan Wieck1999-05-20
| | | | | | | | SelectStmt and CursorStmt tried to parse FOR UPDATE ... / FOR READ ONLY. Cursor now checks that it is read only by looking at forUpdate of Query. SelectStmt handles FOR READ ONLY too. Jan
* Remove 4096 string limited key on block sizeBruce Momjian1999-05-19
|
* Upgrade to PyGreSQL (2.4)Bruce Momjian1999-05-19
|
* Add Aggref and ArrayRef to the set of node types that transformExprTom Lane1999-05-18
| | | | | | will pass through rather than spitting up. This is necessary to handle cases where coerce_type causes a subexpression to be retransformed, as in SELECT count(*) + 1.0 FROM table
* Skip junk nodes when comparing UNION target list lengths.Bruce Momjian1999-05-17
|
* Change resjunk to a boolean.Bruce Momjian1999-05-17
|
* Prior patch added 2 more characters to string allocatedTom Lane1999-05-17
| | | | for SERIAL column's constraint, but forgot to increase space palloc'd...
* SELECT * error message fix.Bruce Momjian1999-05-17
|