1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-12 21:01:52 +03:00
Commit Graph

466 Commits

Author SHA1 Message Date
4b2c2850bf Clean up #include in /include directory. Add scripts for checking includes. 1999-07-15 15:21:54 +00:00
ad4948862c Remove S*I comments from Stephan. 1999-07-13 21:17:45 +00:00
07842084fe pgindent run over code. 1999-05-25 16:15:34 +00:00
353d36f979 Remove no-longer-used fields in Hash and HashJoin nodes. 1999-05-18 21:34:29 +00:00
585c967720 Change resjunk to a boolean. 1999-05-17 17:03:51 +00:00
79c2576f77 Replaced targetlist entry in GroupClause by reference number
in Resdom and GroupClause so changing of resno's doesn't confuse
the grouping any more.

Jan
1999-05-12 15:02:39 +00:00
b204d10c79 Executor no longer cares about mergejoinop, mergerightorder, mergeleftorder,
so remove them from MergeJoin node.  Hack together a partial
solution for commuted mergejoin operators --- yesterday
a mergejoin int4 = int8 would crash if the planner decided to
commute it, today it works.  The planner's representation of
mergejoins really needs a rewrite though.
Also, further testing of mergejoin ops in opr_sanity regress test.
1999-03-01 00:10:44 +00:00
31cce21fb0 Fix bushy plans. Cleanup. 1999-02-18 00:49:48 +00:00
c5449d5354 otherrels is now unjoined_rels 1999-02-15 05:21:12 +00:00
6724a50787 Change my-function-name-- to my_function_name, and optimizer renames. 1999-02-13 23:22:53 +00:00
c0d17c7aee JoinPath -> NestPath for nested loop. 1999-02-12 06:43:53 +00:00
3fdb9bb9c7 Fix optimizer and make faster. 1999-02-12 05:57:08 +00:00
d244df95db More optimizer speedups. 1999-02-11 14:59:09 +00:00
f859c81c18 Rename Path.keys to Path.pathkeys. Too many 'keys' used for other things. 1999-02-10 03:52:54 +00:00
318e593f03 Rename Temp to Noname for noname tables. 1999-02-09 17:03:14 +00:00
fe35ffe7e0 Major optimizer improvement for joining a large number of tables. 1999-02-09 03:51:42 +00:00
54e5d25666 Optimizer cleanup. 1999-02-08 04:29:25 +00:00
6e2edaf4b8 Optimizer cleanup. 1999-02-05 19:59:31 +00:00
ce3afccf7f More optimizer cleanups. 1999-02-04 03:19:11 +00:00
18fbe4142f More optimizer renaming HInfo -> HashInfo. 1999-02-04 01:47:02 +00:00
9322950aa4 Cleanup of source files where 'return' or 'var =' is alone on a line. 1999-02-03 21:18:02 +00:00
8d9237d485 Optimizer rename ClauseInfo -> RestrictInfo. Update optimizer README. 1999-02-03 20:15:53 +00:00
4390b0bfbe Add TEMP tables/indexes. Add COPY pfree(). Other cleanups. 1999-02-02 03:45:56 +00:00
17467bb7fb Rename Aggreg to Aggref. 1999-01-24 00:28:37 +00:00
12be3e08f1 FOR UPDATE is in parser & rules. 1999-01-21 16:08:55 +00:00
bd8ffc6f3f Hi!
INTERSECT and EXCEPT is available for postgresql-v6.4!

The patch against v6.4 is included at the end of the current text
(in uuencoded form!)

I also included the text of my Master's Thesis. (a postscript
version). I hope that you find something of it useful and would be
happy if parts of it find their way into the PostgreSQL documentation
project (If so, tell me, then I send the sources of the document!)

The contents of the document are:
  -) The first chapter might be of less interest as it gives only an
     overview on SQL.

  -) The second chapter gives a description on much of PostgreSQL's
     features (like user defined types etc. and how to use these features)

  -) The third chapter starts with an overview of PostgreSQL's internal
     structure with focus on the stages a query has to pass (i.e. parser,
     planner/optimizer, executor). Then a detailed description of the
     implementation of the Having clause and the Intersect/Except logic is
     given.

Originally I worked on v6.3.2 but never found time enough to prepare
and post a patch. Now I applied the changes to v6.4 to get Intersect
and Except working with the new version. Chapter 3 of my documentation
deals with the changes against v6.3.2, so keep that in mind when
comparing the parts of the code printed there with the patched sources
of v6.4.

Here are some remarks on the patch. There are some things that have
still to be done but at the moment I don't have time to do them
myself. (I'm doing my military service at the moment) Sorry for that
:-(

-) I used a rewrite technique for the implementation of the Except/Intersect
   logic which rewrites the query to a semantically equivalent query before
   it is handed to the rewrite system (for views, rules etc.), planner,
   executor etc.

-) In v6.3.2 the types of the attributes of two select statements
   connected by the UNION keyword had to match 100%. In v6.4 the types
   only need to be familiar (i.e. int and float can be mixed). Since this
   feature did not exist when I worked on Intersect/Except it
   does not work correctly for Except/Intersect queries WHEN USED IN
   COMBINATION WITH UNIONS! (i.e. sometimes the wrong type is used for the
   resulting table. This is because until now the types of the attributes of
   the first select statement have been used for the resulting table.
   When Intersects and/or Excepts are used in combination with Unions it
   might happen, that the first select statement of the original query
   appears at another position in the query which will be executed. The reason
   for this is the technique used for the implementation of
   Except/Intersect which does a query rewrite!)
   NOTE: It is NOT broken for pure UNION queries and pure INTERSECT/EXCEPT
         queries!!!

-) I had to add the field intersect_clause to some data structures
   but did not find time to implement printfuncs for the new field.
   This does NOT break the debug modes but when an Except/Intersect
   is used the query debug output will be the already rewritten query.

-) Massive changes to the grammar rules for SELECT and INSERT statements
   have been necessary (see comments in gram.y and documentation for
   deatails) in order to be able to use mixed queries like
   (SELECT ... UNION (SELECT ... EXCEPT SELECT)) INTERSECT SELECT...;

-) When using UNION/EXCEPT/INTERSECT you will get:
   NOTICE: equal: "Don't know if nodes of type xxx are equal".
   I did not have  time to add comparsion support for all the needed nodes,
   but the default behaviour of the function equal met my requirements.
   I did not dare to supress this message!

   That's the reason why the regression test for union will fail: These
   messages are also included in the union.out file!

-) Somebody of you changed the union_planner() function for v6.4
   (I copied the targetlist to new_tlist and that was removed and
   replaced by a cleanup of the original targetlist). These chnages
   violated some having queries executed against views so I changed
   it back again. I did not have time to examine the differences between the
   two versions but now it works :-)
   If you want to find out, try the file queries/view_having.sql on
   both versions and compare the results . Two queries won't produce a
   correct result with your version.

regards

    Stefan
1999-01-18 00:10:17 +00:00
4140c2f30e Add support for the CASE statement in the rewrite handling.
Allows (at least some) rules and views.
Still some trouble (crashes) with target CASE columns spanning tables,
 but lots now works.
1998-12-14 00:02:17 +00:00
34680930d5 Fix using indices in OR.
EXPLAIN all indices used.
1998-11-22 10:48:45 +00:00
002657f7ed Add LIMIT syntax for Jan. 1998-10-22 13:52:24 +00:00
fa1a8d6a97 OK, folks, here is the pgindent output. 1998-09-01 04:40:42 +00:00
af74855a60 Renaming cleanup, no pgindent yet. 1998-09-01 03:29:17 +00:00
d9be0ff432 MergeSort was sometimes called mergejoin and was confusing. Now
it is now only mergejoin.
1998-08-04 16:44:31 +00:00
0a2e5cdfc9 Allow index use with OR clauses. 1998-08-01 22:12:13 +00:00
584f9438ca Rename Rel to RelOptInfo. 1998-07-18 04:22:52 +00:00
9e964f90fb Fix explain for union and inheritance. Rename Append structure
members to be clearer.  Fix cost computation for these.
1998-07-15 14:54:39 +00:00
3600fd320f Major man page update from Tom Lane. c 1998-07-14 01:45:25 +00:00
6bd323c6b3 Remove un-needed braces around single statements. 1998-06-15 19:30:31 +00:00
4fcd0d6371 FIx confusion over SORT and SORTCLAUSE in node handling. 1998-04-27 02:58:07 +00:00
a32450a585 pgindent run before 6.3 release, with Thomas' requested changes. 1998-02-26 04:46:47 +00:00
ec9e44ab7c Add handling for new RangeTblEntry column name. 1998-02-21 18:17:58 +00:00
856da1e65a Constlen can be -1, so make it a signed type. 1998-02-21 16:58:49 +00:00
dc892fd390 Support for subselects.
(Have to re-visit readfuncs.c)
1998-02-13 03:27:47 +00:00
0386a50f31 Pass around typmod as int16. 1998-02-10 16:04:38 +00:00
2c482cdbf2 Pass attypmod through to executor by adding to Var and Resdom. 1998-02-10 04:02:59 +00:00
7f31669bea Add Var.varlevelup to code. More parser cleanup. 1998-01-20 22:12:17 +00:00
412a5e6539 Parser cleanup.
Add lock to i386 asm.
1998-01-20 05:05:08 +00:00
1316113ea3 Fix problem with nodes handling. 1998-01-19 18:11:10 +00:00
b37bc65f44 Creates the SubLink structure, and the Query->hasSubLink field,
with supporting code.

Creates SubLink node in gram.y.

psql.c patch for newatttypmod field.
1998-01-17 04:53:46 +00:00
763ff8aef8 Remove Query->qry_aggs and qry_numaggs and replace with Query->hasAggs.
Pass List* of Aggregs into executor, and create needed array there.
No longer need to double-processs Aggregs with second copy in Query.

Fix crash when doing:

	select sum(x+1) from test where 1 > 0;
1998-01-15 19:00:16 +00:00
679d39b9c8 Goodbye ABORT. Hello ERROR for all errors. 1998-01-07 21:07:04 +00:00