- 27 Mar, 2001 1 commit
-
-
Tom Lane authored
-
- 22 Mar, 2001 1 commit
-
-
Bruce Momjian authored
-
- 08 Mar, 2001 1 commit
-
-
Tom Lane authored
be allowed to receive ungrouped variables of the current query level. Curious that no one reported this bug before...
-
- 12 Feb, 2001 2 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
-
- 24 Jan, 2001 1 commit
-
-
Bruce Momjian authored
-
- 16 Nov, 2000 1 commit
-
-
Tom Lane authored
maintained for each cache entry. A cache entry will not be freed until the matching ReleaseSysCache call has been executed. This eliminates worries about cache entries getting dropped while still in use. See my posting to pg-hackers of even date for more info.
-
- 05 Oct, 2000 1 commit
-
-
Tom Lane authored
SQL92 semantics, including support for ALL option. All three can be used in subqueries and views. DISTINCT and ORDER BY work now in views, too. This rewrite fixes many problems with cross-datatype UNIONs and INSERT/SELECT where the SELECT yields different datatypes than the INSERT needs. I did that by making UNION subqueries and SELECT in INSERT be treated like subselects-in-FROM, thereby allowing an extra level of targetlist where the datatype conversions can be inserted safely. INITDB NEEDED!
-
- 29 Sep, 2000 1 commit
-
-
Tom Lane authored
(Don't forget that an alias is required.) Views reimplemented as expanding to subselect-in-FROM. Grouping, aggregates, DISTINCT in views actually work now (he says optimistically). No UNION support in subselects/views yet, but I have some ideas about that. Rule-related permissions checking moved out of rewriter and into executor. INITDB REQUIRED!
-
- 25 Sep, 2000 1 commit
-
-
Tom Lane authored
complaints about ungrouped variables. This is for consistency with behavior elsewhere, notably the fact that the relname is reported as an alias in these same complaints. Also, it'll work with subselect- in-FROM where old code didn't.
-
- 12 Sep, 2000 1 commit
-
-
Tom Lane authored
ends to clean up (see my message of same date to pghackers), but mostly it works. INITDB REQUIRED!
-
- 24 Aug, 2000 1 commit
-
-
Tom Lane authored
for example, an SQL function can be used in a functional index. (I make no promises about speed, but it'll work ;-).) Clean up and simplify handling of functions returning sets.
-
- 21 Aug, 2000 1 commit
-
-
Tom Lane authored
macros where appropriate (the code used to have several different ways of doing that, including Int32, Int8, UInt8, ...). Remove last few references to float32 and float64 typedefs --- it's all float4/float8 now. The typedefs themselves should probably stay in c.h for a release or two, though, to avoid breaking user-written C functions.
-
- 13 Aug, 2000 1 commit
-
-
Tom Lane authored
right thing with variable-free clauses that contain noncachable functions, such as 'WHERE random() < 0.5' --- these are evaluated once per potential output tuple. Expressions that contain only Params are now candidates to be indexscan quals --- for example, 'var = ($1 + 1)' can now be indexed. Cope with RelabelType nodes atop potential indexscan variables --- this oversight prevents 7.0.* from recognizing some potentially indexscanable situations.
-
- 08 Aug, 2000 1 commit
-
-
Tom Lane authored
from Param nodes, per discussion a few days ago on pghackers. Add new expression node type FieldSelect that implements the functionality where it's actually needed. Clean up some other unused fields in Func nodes as well. NOTE: initdb forced due to change in stored expression trees for rules.
-
- 12 Jul, 2000 1 commit
-
-
Tom Lane authored
memory contexts. Currently, only leaks in expressions executed as quals or projections are handled. Clean up some old dead cruft in executor while at it --- unused fields in state nodes, that sort of thing.
-
- 30 May, 2000 1 commit
-
-
Bruce Momjian authored
-
- 28 May, 2000 1 commit
-
-
Tom Lane authored
that have at least one constant-NULL input, even if other inputs are not constants.
-
- 16 Apr, 2000 1 commit
-
-
Tom Lane authored
since it has no way to indicate to its caller that the constant is actually NULL. This prevents coredump in cases like WHERE textfield < null::text;
-
- 12 Apr, 2000 1 commit
-
-
Bruce Momjian authored
-
- 04 Apr, 2000 1 commit
-
-
Tom Lane authored
WHERE in a place where it can be part of a nestloop inner indexqual. As the code stood, it put the same physical sub-Plan node into both indxqual and indxqualorig of the IndexScan plan node. That confused later processing in the optimizer (which expected that tracing the subPlan list would visit each subplan node exactly once), and would probably have blown up in the executor if the planner hadn't choked first. Fix by making the 'fixed' indexqual be a complete deep copy of the original indexqual, rather than trying to share nodes below the topmost operator node. This had further ramifications though, because we were making the aforesaid list of sub-Plan nodes during SS_process_sublinks which is run before construction of the 'fixed' indexqual, meaning that the copy of the sub-Plan didn't show up in that list. Fix by rearranging logic so that the sub-Plan list is built by the final set_plan_references pass, not in SS_process_sublinks. This may sound like a mess, but it's actually a good deal cleaner now than it was before, because we are no longer dependent on the assumption that planning will never make a copy of a sub-Plan node.
-
- 21 Mar, 2000 1 commit
-
-
Tom Lane authored
to simplify constant expressions and expand SubLink nodes into SubPlans is done in a separate routine subquery_planner() that calls union_planner(). We formerly did most of this work in query_planner(), but that's the wrong place because it may never see the real targetlist. Splitting union_planner into two routines also allows us to avoid redundant work when union_planner is invoked recursively for UNION and inheritance cases. Upshot is that it is now possible to do something like select float8(count(*)) / (select count(*) from int4_tbl) from int4_tbl group by f1; which has never worked before.
-
- 19 Mar, 2000 1 commit
-
-
Tom Lane authored
-
- 12 Mar, 2000 1 commit
-
-
Tom Lane authored
that the inputs to a given operator can be recursively simplified to constants, it was evaluating the operator using the op's *original* (unsimplified) arg list, so that any subexpressions had to be evaluated again. A constant subexpression at depth N got evaluated N times. Probably not very important in practical situations, but it made us look real slow in MySQL's 'crashme' test...
-
- 20 Feb, 2000 1 commit
-
-
Tom Lane authored
represent the result of a binary-compatible type coercion. At runtime it just evaluates its argument --- but during type resolution, exprType will pick up the output type of the RelabelType node instead of the type of the argument. This solves some longstanding problems with dropped type coercions, an example being 'select now()::abstime::int4' which used to produce date-formatted output, not an integer, because the coercion to int4 was dropped on the floor.
-
- 15 Feb, 2000 1 commit
-
-
Thomas G. Lockhart authored
SELECT a FROM t1 tx (a); Allow join syntax, including queries like SELECT * FROM t1 NATURAL JOIN t2; Update RTE structure to hold column aliases in an Attr structure.
-
- 26 Jan, 2000 1 commit
-
-
Bruce Momjian authored
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
-
- 13 Dec, 1999 1 commit
-
-
Tom Lane authored
Note this forces initdb because of change of Aggref node in stored rules.
-
- 09 Dec, 1999 1 commit
-
-
Tom Lane authored
shows the specific ungrouped variable being complained of. Perhaps this will reduce user confusion...
-
- 22 Nov, 1999 1 commit
-
-
Bruce Momjian authored
Make all system indexes unique. Make all cache loads use system indexes. Rename *rel to *relid in inheritance tables. Rename cache names to be clearer.
-
- 07 Oct, 1999 1 commit
-
-
Tom Lane authored
mentioned in FROM but not elsewhere in the query: such tables should be joined over anyway. Aside from being more standards-compliant, this allows removal of some very ugly hacks for COUNT(*) processing. Also, allow HAVING clause without aggregate functions, since SQL does. Clean up CREATE RULE statement-list syntax the same way Bruce just fixed the main stmtmulti production. CAUTION: addition of a field to RangeTblEntry nodes breaks stored rules; you will have to initdb if you have any rules.
-
- 02 Oct, 1999 1 commit
-
-
Tom Lane authored
in the Expr nodes they produce. This fixes a few cases of errors like 'typeidTypeRelid: Invalid type - oid = 0' caused by calling parser-related routines on expression trees that have already been processed by planner- related routines.
-
- 26 Sep, 1999 1 commit
-
-
Tom Lane authored
Frankpitt, plus some improvements from yours truly. The simplifier depends on the proiscachable field of pg_proc to tell it whether a function is safe to pre-evaluate --- things like nextval() are not, for example. Update pg_proc.h to contain reasonable cacheability information; as of 6.5.* hardly any functions were marked cacheable. I may have erred too far in the other direction; see recent mail to pghackers for more info. This update does not force an initdb, exactly, but you won't see much benefit from the simplifier until you do one.
-
- 09 Sep, 1999 1 commit
-
-
Tom Lane authored
was rejecting negative attnums as bogus, which of course they are not. Add code to get_attdisbursion to produce a useful value for OID attribute, since VACUUM does not store stats for system attributes. Also, repair bug that's been in eqjoinsel for a long time: it was taking the max of the two columns' disbursions, whereas it should use the min.
-
- 26 Aug, 1999 1 commit
-
-
Tom Lane authored
Most parts of the planner should ignore, or indeed never even see, uplevel Vars because they will be or have been replaced by Params. There were a couple of places that got it wrong though, probably my fault from recent changes...
-
- 25 Aug, 1999 1 commit
-
-
Tom Lane authored
documented intepretation of the lefthand and oper fields. Fix a number of obscure problems while at it --- for example, the old code failed if the parser decided to insert a type-coercion function just below the operator of a SubLink. CAUTION: this will break stored rules that contain subplans. You may need to initdb.
-
- 22 Aug, 1999 1 commit
-
-
Tom Lane authored
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 ...
-
- 16 Aug, 1999 1 commit
-
-
Tom Lane authored
store all ordering information in pathkeys lists (which are now lists of lists of PathKeyItem nodes, not just lists of lists of vars). This was a big win --- the code is smaller and IMHO more understandable than it was, even though it handles more cases. I believe the node changes will not force an initdb for anyone; planner nodes don't show up in stored rules.
-
- 12 Aug, 1999 1 commit
-
-
Tom Lane authored
commuted (ie, the index var appears on the right). These are now handled the same way as merge and hash join quals that need to be commuted: the actual reversing of the clause only happens if we actually choose the path and generate a plan from it. Furthermore, the clause is only reversed in the 'indexqual' field of the plan, not in the 'indxqualorig' field. This allows the clause to still be recognized and removed from qpquals of upper level join plans. Also, simplify and generalize match_clause_to_indexkey; now it recognizes binary-compatible indexes for join as well as restriction clauses.
-
- 10 Aug, 1999 1 commit
-
-
Tom Lane authored
routines that are now dead code.
-