- Dec 09, 2003
-
-
Tom Lane authored
planning to modify them itself. Otherwise we end up with shared RTE substructure, which breaks inheritance_planner because the rte->inh flag needs to be independent in each copied subquery. Per bug report from Chris Piker.
-
- Nov 29, 2003
-
-
PostgreSQL Daemon authored
$Header: -> $PostgreSQL Changes ...
-
- Oct 29, 2003
-
-
Tom Lane authored
Per example from Ian Barwick, 28-Oct-03.
-
- Aug 18, 2003
-
-
Tom Lane authored
be anything yielding an array of the proper kind, not only sub-ARRAY[] constructs; do subscript checking at runtime not parse time. Also, adjust array_cat to make array || array comply with the SQL99 spec. Joe Conway
-
- Aug 08, 2003
-
-
Bruce Momjian authored
-
- Aug 04, 2003
-
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Tom Lane authored
should catch most situations where repeated inlining blows up the expression complexity unreasonably, as in Joe Conway's recent example.
-
- Jul 28, 2003
-
-
Tom Lane authored
-
- Jul 25, 2003
-
-
Tom Lane authored
-
- Jul 03, 2003
-
-
Tom Lane authored
instead of the former kluge whereby gram.y emitted already-transformed expressions. This is needed so that Params appearing in these clauses actually work correctly. I suppose some might claim that the side effect of 'SELECT ... LIMIT 2+2' working is a new feature, but I say this is a bug fix.
-
Tom Lane authored
so it has some chance of working in rules ...
-
- Jul 01, 2003
-
-
Tom Lane authored
takes only a few more lines of code than preventing it, so might as well support it.
-
Tom Lane authored
ANYELEMENT. The effect is to postpone typechecking of the function body until runtime. Documentation is still lacking. Original patch by Joe Conway, modified to postpone type checking by Tom Lane.
-
- Jun 29, 2003
-
-
Tom Lane authored
'scalar op ALL (array)', where the operator is applied between the lefthand scalar and each element of the array. The operator must yield boolean; the result of the construct is the OR or AND of the per-element results, respectively. Original coding by Joe Conway, after an idea of Peter's. Rewritten by Tom to keep the implementation strictly separate from subqueries.
-
- Jun 25, 2003
-
-
Bruce Momjian authored
Joe Conway
-
Bruce Momjian authored
Joe Conway
-
- Jun 06, 2003
-
-
Tom Lane authored
extensions to support our historical behavior. An aggregate belongs to the closest query level of any of the variables in its argument, or the current query level if there are no variables (e.g., COUNT(*)). The implementation involves adding an agglevelsup field to Aggref, and treating outer aggregates like outer variables at planning time.
-
- May 29, 2003
-
-
Tom Lane authored
introducing new 'FastList' list-construction subroutines to use in hot spots. This avoids the O(N^2) behavior of repeated lappend's by keeping a tail pointer, while not changing behavior by reversing list order as the lcons() method would do.
-
- May 28, 2003
-
-
Tom Lane authored
of an index can now be a computed expression instead of a simple variable. Restrictions on expressions are the same as for predicates (only immutable functions, no sub-selects). This fixes problems recently introduced with inlining SQL functions, because the inlining transformation is applied to both expression trees so the planner can still match them up. Along the way, improve efficiency of handling index predicates (both predicates and index expressions are now cached by the relcache) and fix 7.3 oversight that didn't record dependencies of predicate expressions.
-
- Apr 30, 2003
-
-
Tom Lane authored
that the types of untyped string-literal constants are deduced (ie, when coerce_type is applied to 'em, that's what the type must be). Remove the ancient hack of storing the input Param-types array as a global variable, and put the info into ParseState instead. This touches a lot of files because of adjustment of routine parameter lists, but it's really not a large patch. Note: PREPARE statement still insists on exact specification of parameter types, but that could easily be relaxed now, if we wanted to do so.
-
- Apr 27, 2003
-
-
Tom Lane authored
I had inadvertently omitted it while rearranging things to support length-counted incoming messages. Also, change the parser's API back to accepting a 'char *' query string instead of 'StringInfo', as the latter wasn't buying us anything except overhead. (I think when I put it in I had some notion of making the parser API 8-bit-clean, but seeing that flex depends on null-terminated input, that's not really ever gonna happen.)
-
- Apr 09, 2003
-
-
Tom Lane authored
expressions, ARRAY(sub-SELECT) expressions, some array functions. Polymorphic functions using ANYARRAY/ANYELEMENT argument and return types. Some regression tests in place, documentation is lacking. Joe Conway, with some kibitzing from Tom Lane.
-
- Mar 22, 2003
-
-
Tom Lane authored
refers to a non-DISTINCT output column of a DISTINCT ON subquery, or if it refers to a function-returning-set, we cannot push it down. But the old implementation refused to push down *any* quals if the subquery had any such 'dangerous' outputs. Now we just look at the output columns actually referenced by each qual expression. More code than before, but probably no slower since we don't make unnecessary checks.
-
- Mar 14, 2003
-
-
Tom Lane authored
into an ordinary one-field Var. Per example from Chris Mungall.
-
- Mar 10, 2003
-
-
Tom Lane authored
utility statement (DeclareCursorStmt) with a SELECT query dangling from it, rather than a SELECT query with a few unusual fields in it. Add code to determine whether a planned query can safely be run backwards. If DECLARE CURSOR specifies SCROLL, ensure that the plan can be run backwards by adding a Materialize plan node if it can't. Without SCROLL, you get an error if you try to fetch backwards from a cursor that can't handle it. (There is still some discussion about what the exact behavior should be, but this is necessary infrastructure in any case.) Along the way, make EXPLAIN DECLARE CURSOR work.
-
- Feb 16, 2003
-
-
Tom Lane authored
that turn into CASE expressions. They evaluate their arguments at most once. Patch by Kris Jurka, review and (very light) editorializing by me.
-
- Feb 09, 2003
-
-
Tom Lane authored
rid of the assumption that sizeof(Oid)==sizeof(int). This is one small step towards someday supporting 8-byte OIDs. For the moment, it doesn't do much except get rid of a lot of unsightly casts.
-
- Feb 08, 2003
-
-
Tom Lane authored
Instead of Lists of integers, we now store variable-length bitmap sets. This should be faster as well as less error-prone.
-
- Feb 04, 2003
-
-
Tom Lane authored
and convert pull_agg_clause() into count_agg_clause(), which is a more efficient way of doing what it's really being used for.
-
- Feb 03, 2003
-
-
Tom Lane authored
startup, not in the parser; this allows ALTER DOMAIN to work correctly with domain constraint operations stored in rules. Rod Taylor; code review by Tom Lane.
-
- Jan 20, 2003
-
-
Tom Lane authored
There are two implementation techniques: the executor understands a new JOIN_IN jointype, which emits at most one matching row per left-hand row, or the result of the IN's sub-select can be fed through a DISTINCT filter and then joined as an ordinary relation. Along the way, some minor code cleanup in the optimizer; notably, break out most of the jointree-rearrangement preprocessing in planner.c and put it in a new file prep/prepjointree.c.
-
- Jan 17, 2003
-
-
Tom Lane authored
that used to do it in planner. That was an ancient kluge that was never satisfactory; errors should be detected at parse time when possible. But at the time we didn't have the support mechanism (expression_tree_walker et al) to make it convenient to do in the parser.
-
Tom Lane authored
simplify callers. It turns out the common case is that the caller does want to recurse into sub-queries, so push support for that into these subroutines.
-
- Jan 15, 2003
-
-
Tom Lane authored
containing a volatile function), rather than only on 'Var = Var' clauses as before. This makes it practical to do flatten_join_alias_vars at the start of planning, which in turn eliminates a bunch of klugery inside the planner to deal with alias vars. As a free side effect, we now detect implied equality of non-Var expressions; for example in SELECT ... WHERE a.x = b.y and b.y = 42 we will deduce a.x = 42 and use that as a restriction qual on a. Also, we can remove the restriction introduced 12/5/02 to prevent pullup of subqueries whose targetlists contain sublinks. Still TODO: make statistical estimation routines in selfuncs.c and costsize.c smarter about expressions that are more complex than plain Vars. The need for this is considerably greater now that we have to be able to estimate the suitability of merge and hash join techniques on such expressions.
-
- Jan 10, 2003
-
-
Tom Lane authored
Simplify SubLink by storing just a List of operator OIDs, instead of a list of incomplete OpExprs --- that was a bizarre and bulky choice, with no redeeming social value since we have to build new OpExprs anyway when forming the plan tree.
-
- Dec 15, 2002
-
-
Tom Lane authored
a per-query memory context created by CreateExecutorState --- and destroyed by FreeExecutorState. This provides a final solution to the longstanding problem of memory leaked by various ExecEndNode calls.
-
- Dec 14, 2002
-
-
Tom Lane authored
in the planned representation of a subplan at all any more, only SubPlan. This means subselect.c doesn't scribble on its input anymore, which seems like a good thing; and there are no longer three different possible interpretations of a SubLink. Simplify node naming and improve comments in primnodes.h. No change to stored rules, though.
-
- Dec 13, 2002
-
-
Tom Lane authored
execution state trees, and ExecEvalExpr takes an expression state tree not an expression plan tree. The plan tree is now read-only as far as the executor is concerned. Next step is to begin actually exploiting this property.
-
- Dec 12, 2002
-
-
Tom Lane authored
make VALUE a non-reserved word again, use less invasive method of passing ConstraintTestValue into transformExpr, fix problems with nested constraint testing, do correct thing with NULL result from a constraint expression, remove memory leak. Domain checks still need much more work if we are going to allow ALTER DOMAIN, however.
-