Commit Graph

144 Commits

Author SHA1 Message Date
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
683f399391 Change atttypmod from int16 to int32, for Thomas. 1998-07-12 21:29:40 +00:00
6bd323c6b3 Remove un-needed braces around single statements. 1998-06-15 19:30:31 +00:00
27db9ecd0b Fix macros that were not properly surrounded by parens or braces. 1998-06-15 18:40:05 +00:00
09baa3cc81 This patch...
1. Removes the unnecessary "#define AbcRegProcedure 123"'s from
pg_proc.h.

2. Changes those #defines to use the names already defined in
fmgr.h.

3. Forces the make of fmgr.h in backend/Makefile instead of having
it
   made as a dependency in access/common/Makefile  *hack*hack*hack*

4. Rearranged the #includes to a less helter-skelter arrangement,
also
    changing <file.h> to "file.h" to signify a non-system header.

5. Removed "pg_proc.h" from files where its only purpose was for
the
   #defines removed in item #1.

6. Added "fmgr.h" to each file changed for completeness sake.

Turns out that #6 was not necessary for some files because fmgr.h
was being included in a roundabout way SIX levels deep by the first
include.

"access/genam.h"
 ->"access/relscan.h"
   ->"utils/rel.h"
     ->"access/strat.h"
       ->"access/skey.h"
	 ->"fmgr.h"

So adding fmgr.h really didn't add anything to the compile, hopefully
just made it clearer to the programmer.

S Darren.
1998-04-27 04:08:07 +00:00
5529b783a8 Move HAVING function to proper file. 1998-04-15 15:29:57 +00:00
8eb08ae6b9 Cleanup up code. 1998-04-13 21:07:15 +00:00
645146260e Cleanup of compiler warnings. 1998-04-06 02:38:26 +00:00
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
bb80f8a918 Fix merging pathes of pruned rels ("indices are unused" problem). 1998-04-02 07:27:15 +00:00
8dc48ba877 Small HAVING cleanup. 1998-03-31 23:31:10 +00:00
d7050cb68c Merge rename name page into alter table. Fix UNION with DISTINCT
or ORDER BY bug.
1998-03-31 04:44:35 +00:00
01ecb2e3a0 documentation for HAVING, clean up UNION comment. 1998-03-30 19:05:10 +00:00
9a0dd4fb18 There's a patch attached to fix gcc 2.8.x warnings, except for the
yyerror ones from bison. It also includes a few 'enhancements' to
the C programming style (which are, of course, personal).

The other patch removes the compilation of backend/lib/qsort.c, as
qsort() is a standard function in stdlib.h and can be used any
where else (and it is). It was only used in
backend/optimizer/geqo/geqo_pool.c, backend/optimizer/path/predmig.c,
and backend/storage/page/bufpage.c

> > Some or all of these changes might not be appropriate for v6.3,
since we > > are in beta testing and since they do not affect the
current functionality.  > > For those cases, how about submitting
patches based on the final v6.3 > > release?

There's more to come. Please review these patches. I ran the
regression tests and they only failed where this was expected
(random, geo, etc).

Cheers,

Jeroen
1998-03-30 16:47:35 +00:00
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
a866d1adef Fix for Datasize = 0 error, from Vadim. 1998-03-16 05:49:32 +00:00
4d72e2b1c6 subselect notes from Vadim. 1998-03-16 05:37:16 +00:00
a32450a585 pgindent run before 6.3 release, with Thomas' requested changes. 1998-02-26 04:46:47 +00:00
e51c674c59 Support for subselects. 1998-02-13 03:40:23 +00:00
9184073324 Call union_planner() instead of planner(). 1998-02-13 03:39:26 +00:00
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
a3f1c3673f Quite limited support for subselects in clausesel.c.
Get rid of #ifdef INDEXSCAN_PATCH in indxpath.c.
1998-02-13 03:29:39 +00:00
24cab6bd0d Goodbye register keyword. Compiler knows better. 1998-02-11 19:14:04 +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
c65ea0e040 New pg_attribute.atttypmod for type-specific information like
varchar length.

Cleans up code so attlen is always length.

Removed varchar() hack added earlier.

Will fix bug in selecting varchar() fields, and varchar() can be
variable length.
1998-01-16 23:21:07 +00:00
baef78d96b Thank god for searchable mail archives.
Patch by: wieck@sapserv.debis.de (Jan Wieck)

   One  of  the design rules of PostgreSQL is extensibility. And
   to follow this rule means (at least for me) that there should
   not  only  be a builtin PL.  Instead I would prefer a defined
   interface for PL implemetations.
1998-01-15 19:46:37 +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
f22d8e6668 Function cleanupo for List* when it should be Node *. 1998-01-14 19:55:53 +00:00
cb3ce64f2e Cleanup of prototypes. FIx for PQtrace start/stop several times. 1998-01-14 15:48:51 +00:00
374bb5d261 Some *very* major changes by darrenk@insightdist.com (Darren King)
==========================================
What follows is a set of diffs that cleans up the usage of BLCKSZ.

As a side effect, the person compiling the code can change the
value of BLCKSZ _at_their_own_risk_.  By that, I mean that I've
tried it here at 4096 and 16384 with no ill-effects.  A value
of 4096 _shouldn't_ affect much as far as the kernel/file system
goes, but making it bigger than 8192 can have severe consequences
if you don't know what you're doing.  16394 worked for me, _BUT_
when I went to 32768 and did an initdb, the SCSI driver broke and
the partition that I was running under went to hell in a hand
basket. Had to reboot and do a good bit of fsck'ing to fix things up.

The patch can be safely applied though.  Just leave BLCKSZ = 8192
and everything is as before.  It basically only cleans up all of the
references to BLCKSZ in the code.

If this patch is applied, a comment in the config.h file though above
the BLCKSZ define with warning about monkeying around with it would
be a good idea.

Darren  darrenk@insightdist.com

(Also cleans up some of the #includes in files referencing BLCKSZ.)
==========================================
1998-01-13 04:05:12 +00:00
679d39b9c8 Goodbye ABORT. Hello ERROR for all errors. 1998-01-07 21:07:04 +00:00
9d00fbbeb0 Change some labels in bootparse to make ctags happy. Clean up outfunc/readfunc code and add missing fields for Query structure and new Union fields. Fix optimizer bug shown in new \do command. Change WARN to ERROR in contrib and regression stuff. 1998-01-06 18:53:02 +00:00
0d9fc5afd6 Change elog(WARN) to elog(ERROR) and elog(ABORT). 1998-01-05 03:35:55 +00:00
a1dd409053 Fix for ORDER BY in UNION. 1997-12-29 04:31:50 +00:00
a01b085c78 Cleanup of UNION ALL fix. Manual page updates. 1997-12-29 01:13:37 +00:00
4ce24c8aa9 UNION work for UNION ALL and other union stuff. 1997-12-27 06:41:41 +00:00
d8949adc20 Cleaning GCC warnings. 1997-12-26 06:02:26 +00:00
6231e161c9 Implementation of UNIONs. 1997-12-24 06:06:58 +00:00
e4bd9127cb Remove regression in function. 1997-12-23 03:27:23 +00:00
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
78a055a659 Remove some recursion in optimizer and clean up some code there. 1997-12-21 05:18:48 +00:00
7fd4782504 Fix aggregates on inherited tables. 1997-12-20 07:59:44 +00:00
6e337eef45 Major cleanout of PORTNAME variables from Makefiles...bound to screw up
some of the ports...
1997-12-20 00:29:35 +00:00
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
72c296dffc Remove init_query_planner(), merged into planner(). 1997-12-18 19:41:44 +00:00
6a45941f2f Remove Existential, and ifdef out generate_fjoin. Neither did anything. 1997-12-18 12:54:45 +00:00
4469eb63a3 Cost cleanup. 1997-12-18 12:30:44 +00:00
d3f0e87d17 Cost cleanup. 1997-12-18 12:21:02 +00:00
c64cc3228a Fix Query handling for inheritance, and cost computations. 1997-12-18 03:03:41 +00:00