Commit Graph

1076 Commits

Author SHA1 Message Date
Bruce Momjian
fa1a8d6a97 OK, folks, here is the pgindent output. 1998-09-01 04:40:42 +00:00
Bruce Momjian
af74855a60 Renaming cleanup, no pgindent yet. 1998-09-01 03:29:17 +00:00
Bruce Momjian
9728ce7499 This is the first (of hopefully few) AIX port patches. This patch
was tested with Linux/GCC.  I still have some issues with with the
snprintf() function.

David Hartwig
1998-08-29 04:09:29 +00:00
Bruce Momjian
648f007fdb I have found a minor problem with current configure.in.
[AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LONG_INT_64)],

this line produces something like:

  echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF

and would append garbage "yes cat" to confdefs.h. Of course the
result confdefs.h is not syntactically correct therefore following
tests using confdefs.h would all fail.  To avoid the problem, we
could switch the order of AC_MSG_RESULT and AC_DEFINE (see attached
patch). This happend on my LinuxPPC box.


Tatsuo Ishii t-ishii@sra.co.jp
1998-08-24 04:09:39 +00:00
Bruce Momjian
956b91a944 Cleanups of optimizer. 1998-08-10 04:49:39 +00:00
Bruce Momjian
2d32d909b5 Cleanup optimizer function names and clarify code. 1998-08-10 02:26:40 +00:00
Bruce Momjian
a08dc16c47 New pgindent. 1998-08-09 04:59:10 +00:00
Bruce Momjian
111b80ce00 cleanups. 1998-08-09 04:17:38 +00:00
Bruce Momjian
e46df2ff6e OPTIMIZER_DEBUG additions. 1998-08-07 05:02:32 +00:00
Bruce Momjian
d9be0ff432 MergeSort was sometimes called mergejoin and was confusing. Now
it is now only mergejoin.
1998-08-04 16:44:31 +00:00
Bruce Momjian
809fc91fdd Fix HAVING patch missing cast. 1998-07-24 15:54:10 +00:00
Bruce Momjian
128d827d4b I'm sorry, but I think I introduced a little bug with my last patch.
Everyone using an [NOT] EXISTS subquery will have noticed that
already.

The bug is in "subselect.c" in the function "SS_process_sublinks()".

Here the whole function as it *SHOULD BE*:

Stephan
1998-07-24 04:03:10 +00:00
Bruce Momjian
7702d7aa4b target list fixes. 1998-07-20 21:18:35 +00:00
Bruce Momjian
3dd2eabc53 Cleanup makeTargetEntry and remove internal.c. 1998-07-20 19:53:53 +00:00
Bruce Momjian
460b20a43f 1) Queries using the having clause on base tables should work well
now. Here some tested features, (examples included in the patch):

1.1) Subselects in the having clause 1.2) Double nested subselects
1.3) Subselects used in the where clause and in the having clause
     simultaneously 1.4) Union Selects using having 1.5) Indexes
on the base relations are used correctly 1.6) Unallowed Queries
are prevented (e.g. qualifications in the
     having clause that belong to the where clause) 1.7) Insert
into as select

2) Queries using the having clause on view relations also work
   but there are some restrictions:

2.1) Create View as Select ... Having ...; using base tables in
the select 2.1.1) The Query rewrite system:

2.1.2) Why are only simple queries allowed against a view from 2.1)
? 2.2) Select ... from testview1, testview2, ... having...; 3) Bug
in ExecMergeJoin ??


Regards Stefan
1998-07-19 05:49:26 +00:00
Bruce Momjian
584f9438ca Rename Rel to RelOptInfo. 1998-07-18 04:22:52 +00:00
Bruce Momjian
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
Bruce Momjian
6bd323c6b3 Remove un-needed braces around single statements. 1998-06-15 19:30:31 +00:00
Bruce Momjian
5529b783a8 Move HAVING function to proper file. 1998-04-15 15:29:57 +00:00
Bruce Momjian
8eb08ae6b9 Cleanup up code. 1998-04-13 21:07:15 +00:00
Bruce Momjian
1e801a8f16 Hi,
Attached you'll find a (big) patch that fixes make dep and make
depend in all Makefiles where I found it to be appropriate.

It also removes the dependency in Makefile.global for NAMEDATALEN
and OIDNAMELEN by making backend/catalog/genbki.sh and bin/initdb/initdb.sh
a little smarter.

This no longer requires initdb.sh that is turned into initdb with
a sed script when installing Postgres, hence initdb.sh should be
renamed to initdb (after the patch has been applied :-) )

This patch is against the 6.3 sources, as it took a while to
complete.

Please review and apply,

Cheers,

Jeroen van Vianen
1998-04-06 00:32:26 +00:00
Bruce Momjian
8dc48ba877 Small HAVING cleanup. 1998-03-31 23:31:10 +00:00
Bruce Momjian
c579ce0fb0 I started adding the Having Clause and it works quite fine for
sequential scans! (I think it will also work with hash, index, etc
but I did not check it out! I made some High level changes which
should work for all access methods, but maybe I'm wrong. Please
let me know.)

Now it is possible to make queries like:

select s.sname, max(p.pid), min(p.pid) from part p, supplier s
where s.sid=p.sid group by s.sname having max(pid)=6 and min(pid)=1
or avg(pid)=4;

Having does not work yet for queries that contain a subselect
statement in the Having clause, I'll try to fix this in the next
days.

If there are some bugs, please let me know, I'll start to read the
mailinglists now!

Now here is the patch against the original 6.3 version (no snapshot!!):

Stefan
1998-03-30 16:36:43 +00:00
Bruce Momjian
a866d1adef Fix for Datasize = 0 error, from Vadim. 1998-03-16 05:49:32 +00:00
Bruce Momjian
4d72e2b1c6 subselect notes from Vadim. 1998-03-16 05:37:16 +00:00
Bruce Momjian
a32450a585 pgindent run before 6.3 release, with Thomas' requested changes. 1998-02-26 04:46:47 +00:00
Vadim B. Mikheev
4a6e3a6a9f Old planner() becomes union_planner(); new planner() makes initialization
of some global variables to support subselects and calls union_planner().
Calls to SS_replace_correlation_vars() and SS_process_sublinks() in
query_planner() before planning.
Get rid of #ifdef INDEXSCAN_PATCH in createplan.c.
1998-02-13 03:37:04 +00:00
Bruce Momjian
2c482cdbf2 Pass attypmod through to executor by adding to Var and Resdom. 1998-02-10 04:02:59 +00:00
Bruce Momjian
7f31669bea Add Var.varlevelup to code. More parser cleanup. 1998-01-20 22:12:17 +00:00
Bruce Momjian
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
Bruce Momjian
f22d8e6668 Function cleanupo for List* when it should be Node *. 1998-01-14 19:55:53 +00:00
Bruce Momjian
cb3ce64f2e Cleanup of prototypes. FIx for PQtrace start/stop several times. 1998-01-14 15:48:51 +00:00
Bruce Momjian
679d39b9c8 Goodbye ABORT. Hello ERROR for all errors. 1998-01-07 21:07:04 +00:00
Bruce Momjian
0d9fc5afd6 Change elog(WARN) to elog(ERROR) and elog(ABORT). 1998-01-05 03:35:55 +00:00
Bruce Momjian
a01b085c78 Cleanup of UNION ALL fix. Manual page updates. 1997-12-29 01:13:37 +00:00
Bruce Momjian
4ce24c8aa9 UNION work for UNION ALL and other union stuff. 1997-12-27 06:41:41 +00:00
Bruce Momjian
6231e161c9 Implementation of UNIONs. 1997-12-24 06:06:58 +00:00
Bruce Momjian
d404f1006b Fix for select 1=1 or 2=2, select 1=1 and 2=2, and select sum(2+2). 1997-12-22 05:42:25 +00:00
Bruce Momjian
7fd4782504 Fix aggregates on inherited tables. 1997-12-20 07:59:44 +00:00
Marc G. Fournier
6e337eef45 Major cleanout of PORTNAME variables from Makefiles...bound to screw up
some of the ports...
1997-12-20 00:29:35 +00:00
Marc G. Fournier
5379b84eff More cleanups. I can now compile without PORTNAME being defined n
Makefile.global.

End result, if all goes well, should allow for much easier porting, since
there will no longer be a concept of a "port".  Most, if not everything,
*should* be determined by configure, or by the compiler itself.  Still
work to be done though :)
1997-12-19 02:09:10 +00:00
Bruce Momjian
72c296dffc Remove init_query_planner(), merged into planner(). 1997-12-18 19:41:44 +00:00
Bruce Momjian
6a45941f2f Remove Existential, and ifdef out generate_fjoin. Neither did anything. 1997-12-18 12:54:45 +00:00
Bruce Momjian
4469eb63a3 Cost cleanup. 1997-12-18 12:30:44 +00:00
Bruce Momjian
d3f0e87d17 Cost cleanup. 1997-12-18 12:21:02 +00:00
Bruce Momjian
c64cc3228a Fix Query handling for inheritance, and cost computations. 1997-12-18 03:03:41 +00:00
Bruce Momjian
4a5b781d71 Break parser functions into smaller files, group together. 1997-11-25 22:07:18 +00:00
Bruce Momjian
3fa2bb316c Remove archive stuff. 1997-11-21 18:12:58 +00:00
Vadim B. Mikheev
c42f7f1460 Fix GROUP BY when order of entries is different from order in target list. 1997-09-25 12:21:15 +00:00
Bruce Momjian
59f6a57e59 Used modified version of indent that understands over 100 typedefs. 1997-09-08 21:56:23 +00:00
Bruce Momjian
075cede748 Add typdefs to pgindent run. 1997-09-08 20:59:27 +00:00
Bruce Momjian
319dbfa736 Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting. 1997-09-08 02:41:22 +00:00
Bruce Momjian
1ccd423235 Massive commit to run PGINDENT on all *.c and *.h files. 1997-09-07 05:04:48 +00:00
Bruce Momjian
ec05063be0 Cleanups needed for indent. 1997-09-05 20:20:56 +00:00
Bruce Momjian
240a018176 Cleanups needed for indent. 1997-09-05 19:59:11 +00:00
Bruce Momjian
ae50c8d84b Cleanups needed for indent. 1997-09-05 19:32:44 +00:00
Bruce Momjian
a1635450b3 Cleanups needed for indent. Remove }; 1997-09-05 18:13:45 +00:00
Vadim B. Mikheev
0f576413bc Fix replace_agg_clause() for unary operators. 1997-06-12 17:26:15 +00:00
Vadim B. Mikheev
a1fbd470a9 Fix GroupBy: enable functions over aggregates and GroupBy-ed fields
in target list.
1997-04-29 04:32:50 +00:00
Vadim B. Mikheev
72d271177c Have to copyObject((void*)clauseinfo) for a relation'
joininfo (in add_join_clause_info_to_rels()) : clause may be
commutted later.
1997-04-24 16:04:23 +00:00
Vadim B. Mikheev
e349eb6e2c Bug (yet unfixed but not fatal) found: Re-moving index clauses from the
nestloop's join clauses doesn't work in some cases:
         *    1. fix_indxqual_references may change varattno-s in
         *       inner_indxqual;
         *    2. clauses may be commuted
1997-04-24 15:59:58 +00:00
Vadim B. Mikheev
a1ac1989cf Save Var' order in index_outerjoin_references(). 1997-04-24 15:54:52 +00:00
Vadim B. Mikheev
051b4210e3 Fix for Hash and arrays 1997-04-22 03:32:38 +00:00
Vadim B. Mikheev
c50d8474d3 Changes for GROUP BY func_results. 1997-04-05 06:37:37 +00:00
Marc G. Fournier
d146305065 Patches for Vadim's multikey indexing... 1997-03-18 18:41:37 +00:00
Marc G. Fournier
5dde558ce6 From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] linux/alpha patches

These patches lay the groundwork for a Linux/Alpha port.  The port doesn't
actually work unless you tweak the linker to put all the pointers in the
first 32 bits of the address space, but it's at least a start.  It
implements the test-and-set instruction in Alpha assembly, and also fixes
a lot of pointer-to-integer conversions, which is probably good anyway.
1997-03-12 21:13:19 +00:00
Vadim B. Mikheev
4de2f24895 Fix for queries with 3 or more relations participating in
one clause.
1997-02-20 02:54:09 +00:00
Bruce Momjian
a5dd06f763 include sem.h added, include string.h neede, from Erik Bertelsen for Ultrix 1997-01-10 20:19:49 +00:00
Bruce Momjian
a0990e1884 Makefile cleanup after reorganization 1996-11-09 06:24:51 +00:00
Bruce Momjian
4b2b8592a0 Compile and warning cleanup 1996-11-08 06:02:30 +00:00
Marc G. Fournier
58a0150f64 More files cleaned out 1996-11-06 09:29:26 +00:00
Marc G. Fournier
76294e1d38 Cleanup Makefiles
Add #include "postgres.h"
	and
    #include <sys/types.h>
1996-10-31 10:59:42 +00:00
Bryan Henderson
b0d6f0aa63 Simplify make files, add full dependencies. 1996-10-27 09:55:05 +00:00
Marc G. Fournier
796f78998e Fixes:
The problem is that the function arguments are not considered as possible key
candidates for index scan and so only a sequential scan is possible inside
the body of a function.  I have therefore made some patches to the optimizer
so that indices are now used also by functions.  I have also moved the plan
debug message from pg_eval to pg_plan so that it is printed also for plans
genereated for function execution.  I had also to add an index rescan to the
executor because it ignored the parameters set in the execution state, they
were flagged as runtime variables in ExecInitIndexScan but then never used
by the executor so that the scan were always done with any key=1. Very odd.
This means that an index rescan is now done twice for each function execution
which uses an index, the first time when the index scan is initialized and
the second when the actual function arguments are finally available for the
execution.  I don't know what is the cost of an double index scan but I
suppose it is anyway less than the cost of a full sequential scan, at leat
for large tables. This is my patch, you must also add -DINDEXSCAN_PATCH in
Makefile.global to enable the changes.

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-09-10 06:48:52 +00:00
Marc G. Fournier
a2740a455f There, now we support GiST...now what? :) 1996-08-26 06:32:06 +00:00
Marc G. Fournier
d31084e9d1 Postgres95 1.01 Distribution - Virgin Sources 1996-07-09 06:22:35 +00:00