1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00
Commit Graph

428 Commits

Author SHA1 Message Date
419b91c058 Correct some comments, fix a small memory wastage when datatype
is pass-by-value.
1999-03-21 19:59:13 +00:00
0aa2aed5f8 Reverse out pfree agg part of patch from Erik Riedel. 1999-03-20 13:18:20 +00:00
afac6363a6 cleanup 1999-03-20 02:07:31 +00:00
7d0ab659ac Fix for aggregate memory leaks from Erik Riedel. 1999-03-20 01:13:22 +00:00
0dfc358427 Fix for memory leak in executor with fjIsNull. 1999-03-19 22:31:39 +00:00
bd6f98af31 I suggest the following portability patch, which does not
change functionality, but makes the code more ANSI C'ish.
My AIX xlc compiler barfs on all of these. Can someone please
review and apply to current.

 <<port.patch>>
Thanks
Andreas
1999-03-19 18:56:43 +00:00
5d34abc6f1 Cleanup 1999-03-14 20:01:14 +00:00
2a76aa23e0 We have to return dummy tuple for empty targetlist!
Try select t1.x from t1, t2 where t1.y = 1 and t2.y = 1
- t2 scan target list will be empty and so no one tuple
will be returned...
1999-03-10 12:16:09 +00:00
f34240de06 Changes to fix/improve the dynamic loading on NT
From: Horak Daniel <horak@mmp.plzen-city.cz>
1999-03-09 13:39:15 +00:00
dc77be0432 Fix executor to work correctly with mergejoins where left and
right sides have different data types.
1999-02-28 00:36:05 +00:00
f3f7c2acde update comments 1999-02-24 10:20:07 +00:00
25cccc05aa Fix typos in comments. 1999-02-23 07:36:31 +00:00
6d73a8c0cb Add first code to help with outer joins.
Enable by defining
 CFLAGS+= -DENABLE_OUTER_JOINS -DEXEC_MERGEJOINDEBUG
in your Makefile.custom
1999-02-23 07:35:09 +00:00
97287e1d13 Fix typo in comment. 1999-02-23 07:33:09 +00:00
7fe29ecefc comment cleanup. 1999-02-22 19:40:10 +00:00
8c3e8a8a0e From: Tatsuo Ishii <t-ishii@sra.co.jp>
Ok. I made patches replacing all of "#if FALSE" or "#if 0" to "#ifdef
NOT_USED" for current. I have tested these patches in that the
postgres binaries are identical.
1999-02-21 03:49:55 +00:00
6724a50787 Change my-function-name-- to my_function_name, and optimizer renames. 1999-02-13 23:22:53 +00:00
318e593f03 Rename Temp to Noname for noname tables. 1999-02-09 17:03:14 +00:00
be948af2e8 Added LIMIT/OFFSET functionality including new regression test for it.
Removed CURRENT keyword for rule queries and changed rules regression
accordingly. CURRENT has beed announced to disappear in v6.5.

Jan
1999-02-08 14:14:32 +00:00
ef590e101e Changed ExecConstraints() and ExecRelCheck() to cache the constraints
qualification expression trees in the execution state. Prevents from
memory exhaustion on INSERT, UPDATE or COPY to tables that have CHECK
constraints. Speedup against the variant using freeObject() is more than
factor 2.

Jan
1999-02-07 16:17:14 +00:00
dd4a357dc9 Missing semicolon in last fix :-}
Jan
1999-02-07 14:20:11 +00:00
6fa3d0a7ab One more fix to QuerySnapshot usage in ExecutorStart(). Maybe
current QuerySnapshot could be NULL.

Jan
1999-02-07 13:54:58 +00:00
a5f3abacb5 Fixed problem with multiple portals shown up in portals_p2 regression
test after new AllocSet code.

Activated optimal AllocSet blocksize and chunk limit.

Jan
1999-02-07 13:37:56 +00:00
ead64f317b New alloc set code using a memory block pool for small allocations.
Jan
1999-02-06 16:50:34 +00:00
9322950aa4 Cleanup of source files where 'return' or 'var =' is alone on a line. 1999-02-03 21:18:02 +00:00
4390b0bfbe Add TEMP tables/indexes. Add COPY pfree(). Other cleanups. 1999-02-02 03:45:56 +00:00
072be47202 Initialize es_snapshot. 1999-02-01 13:33:27 +00:00
bfa6d510b3 Small fix for READ COMMITTED isolevel. 1999-01-29 13:24:36 +00:00
aaef7beb79 Hope that execMain.c good merged.
Fix for BEFORE ROW UPDATE triggers: result tuple may be different
(due to concurrent update) from one initially produced by top level plan.
1999-01-29 11:56:01 +00:00
1d41e88568 Trying to fix bad merging... 1999-01-29 10:15:09 +00:00
e3a1ab764e READ COMMITTED isolevel is implemented and is default now. 1999-01-29 09:23:17 +00:00
b946244c1c Quick fix for subplan-related crash. 1999-01-27 16:48:20 +00:00
28d8b42ca5 Speedup of PL/pgSQL by calling ExecEvalExpr() directly
instead of SPI_execp() for simple expressions.

Jan
1999-01-27 16:15:22 +00:00
d611ccb874 fix for aggregates 1999-01-27 16:15:01 +00:00
422221c90d Another SELECT speedup: extract OIDs of column print functions
only once per SELECT, not once per tuple.  10% here, 10% there,
pretty soon you're talking about real speedups ...
1999-01-27 00:36:28 +00:00
36693c0525 More agg cleanup. 1999-01-26 23:32:04 +00:00
1401f63dd1 Agg/Aggreg cleanup and datetime.sql patch. 1999-01-25 18:02:28 +00:00
247b3f9054 SELECT FOR UPDATE is implemented... 1999-01-25 12:01:19 +00:00
d03e98737c Replace typtoout() and gettypelem() with a single routine,
so that fetching an attribute value needs only one SearchSysCacheTuple call
instead of two redundant searches.  This speeds up a large SELECT by about
ten percent, and probably will help GROUP BY and SELECT DISTINCT too.
1999-01-24 05:40:49 +00:00
17467bb7fb Rename Aggreg to Aggref. 1999-01-24 00:28:37 +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
7a6b562fdf Apply Win32 patch from Horak Daniel. 1999-01-17 06:20:06 +00:00
3498d878cb SET TRANSACTION ISOLATION LEVEL ...
LOCK TABLE IN ... MODE
...implemented
1998-12-18 09:10:39 +00:00
c13a64d7fb Serialized mode works! 1998-12-16 11:53:55 +00:00
3f7fbf85dc Initial MVCC code.
New code for locking buffer' context.
1998-12-15 12:47:01 +00:00
9396802f14 more cleanups...of note, appendStringInfo now performs like sprintf(),
where you state a format and arguments.  the old behavior required
each appendStringInfo to have to have a sprintf() before it if any
formatting was required.

Also shortened several instances where there were multiple appendStringInfo()
calls in a row, doing nothing more then adding one more word to the String,
instead of doing them all in one call.
1998-12-14 08:11:17 +00:00
df1468e251 Many more cleanups... 1998-12-14 06:50:32 +00:00
7c3b7d2744 Initial attempt to clean up the code...
Switch sprintf() to snprintf()
Remove any/all #if 0 -or- #ifdef NOT_USED -or- #ifdef FALSE sections of
	code
1998-12-14 05:19:16 +00:00
bedd04a551 Implement CASE expression. 1998-12-04 15:34:49 +00:00
6beba218d7 New HeapTuple structure/interface. 1998-11-27 19:52:36 +00:00