Commit Graph

320 Commits

Author SHA1 Message Date
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
660f458d3b Clean up of copyfuncs. 1998-01-11 20:02:32 +00:00
Bruce Momjian
31a697bf92 Yohoo UNIONS of VIEWS. 1998-01-09 05:48:22 +00:00
Bruce Momjian
679d39b9c8 Goodbye ABORT. Hello ERROR for all errors. 1998-01-07 21:07:04 +00:00
Bruce Momjian
e9dc636e0c Cleanup of outnodes. 1998-01-07 15:32:47 +00:00
Bruce Momjian
c01a56daf5 Fix for views and outnodes. 1998-01-07 08:08:08 +00:00
Bruce Momjian
56466049d6 Cleanup of outnode stuff. 1998-01-07 05:54:11 +00:00
Bruce Momjian
c9d9fe7690 Cleanup of outnode stuff. 1998-01-07 05:50:41 +00:00
Bruce Momjian
a552a894eb Cleanup of outnode stuff. 1998-01-07 05:42:47 +00:00
Bruce Momjian
4557c846de Cleanup of sort nodes and use of strtoul . 1998-01-06 23:19:49 +00:00
Bruce Momjian
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
Bruce Momjian
0d9fc5afd6 Change elog(WARN) to elog(ERROR) and elog(ABORT). 1998-01-05 03:35:55 +00:00
Bruce Momjian
4b05912f0b Fix for count(*), aggs with views and multiple tables and sum(3). 1998-01-04 04:31:43 +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
18adbd9aed Reverse out Thomas's group clause change. 1997-12-23 21:49:03 +00:00
Bruce Momjian
bbd5c21786 Make no-tty not use quiet in psql, fix group by copy failure, fix ccsym to delete tmp files. 1997-12-23 21:38:53 +00:00
Thomas G. Lockhart
2119b523c5 Fix numeric comparision (... != NULL) to be (... > 0). gcc is happier now.
Add non-working code which is commented-out to copy GroupClause structures.
1997-12-23 19:53:30 +00:00
Thomas G. Lockhart
12d5c30c8c Add routines to print AExpr, Ident, and AConst parsing structures. 1997-12-23 19:50:54 +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
Bruce Momjian
e2aec508e2 Replace foo/bar to l1/l2. 1997-12-19 16:54:15 +00:00
Bruce Momjian
30856a3904 copy query cleanup. 1997-12-18 19:46:37 +00:00
Bruce Momjian
e9182152ec Fix copy for no aggregates. 1997-12-18 19:13:49 +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
6b00ec3713 Cleanup of agg copy. 1997-12-18 05:58:40 +00:00
Bruce Momjian
bf9c9f716c Cleanup of agg copy. 1997-12-18 04:33:31 +00:00
Bruce Momjian
c64cc3228a Fix Query handling for inheritance, and cost computations. 1997-12-18 03:03:41 +00:00
Marc G. Fournier
542d4e528d First pass through, of many to come, towards making the whole source
tree "non-PORTNAME" dependent.  Technically, anything that is PORTNAME
dependent should be able to be derived at compile time, through configure
or through gcc
1997-12-17 04:59:16 +00:00
Thomas G. Lockhart
6ad698c928 Add some printing capability for a few more node types (CreateStmt,
IndexStmt, IndexElem, ColumnDef).
1997-12-04 23:20:32 +00:00
Bruce Momjian
4a5b781d71 Break parser functions into smaller files, group together. 1997-11-25 22:07:18 +00:00
Bruce Momjian
e9e1ff226f Remove all time travel stuff. Small parser cleanup. 1997-11-20 23:24:03 +00:00
Vadim B. Mikheev
32cd09ac6d Good Bye, Time Travel! 1997-11-02 15:27:14 +00:00
Bruce Momjian
f3af1368bd Rename strNcpy to StrNCpy, and change third parameter. 1997-10-25 01:10:58 +00:00
Vadim B. Mikheev
6c84398411 + _copyGroup(Group *from) 1997-09-19 06:52:49 +00:00
Bruce Momjian
3f365ba0fc Inline memset() as MemSet(). 1997-09-18 20:22:58 +00:00
Bruce Momjian
b3b0f20412 Cleanup from patch applied. 1997-09-13 11:45:50 +00:00
Bruce Momjian
4213e44a0b Fix for select null, "fail" from pg_am from Patrick van Kleef 1997-09-12 22:07:59 +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
Vadim B. Mikheev
0badb77e73 Fixed _copyRangeTblEntry 1997-09-04 13:24:01 +00:00
Bruce Momjian
1d8bbfd2e7 Make functions static where possible, enclose unused functions in #ifdef NOT_USED. 1997-08-19 21:40:56 +00:00
Bruce Momjian
b99c63cfc0 Now that names are null terminated, no need to do all that NAMEDATALEN stuff. 1997-08-18 20:53:48 +00:00
Bruce Momjian
ea5b5357cd Remove more (void) and fix -Wall warnings. 1997-08-12 22:55:25 +00:00
Bruce Momjian
edb58721b8 Fix pgproc names over 15 chars in output. Add strNcpy() function. remove some (void) casts that are unnecessary. 1997-08-12 20:16:25 +00:00
Bruce Momjian
6ed1715b1f Cleanup for NAMEDATALEN use. 1997-08-03 02:38:47 +00:00
Vadim B. Mikheev
3e248edf43 Added _readAggreg() to work with T_Aggreg type. 1997-05-12 07:17:23 +00:00
Vadim B. Mikheev
81489528d0 Copy indexkeys in _copyIndexPath. 1997-04-10 07:59:09 +00:00
Marc G. Fournier
b66569e41f 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:00:17 +00:00
Bruce Momjian
84876289cc Cast constants to the type of the other binary operand.
Invalidate vacuum relation cache to use new row counts from vacuum.
1997-01-22 01:44:02 +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
28a08fd4ac I have this annoying habit (among others) of putting
%ud in a printf format strings instead of just %u.

There were three occurances of this in catalog_utils.c,
two in parser.c and one in rewriteSupport.c in the oid
patch that I submitted and was applied.  They won't crash
anything, but the error messages will have a 'd' after the
Oid.  Annoying, but none are db-threatening.

Sorry about that folks...I'll be more careful in the future...

Darren King
1996-12-26 17:47:42 +00:00
Bruce Momjian
231e1e70d8 Rename parameter. 1996-12-20 20:31:31 +00:00
Bryan Henderson
7439ba64b1 Use "Oid" type where applicable and %ud instead of %d. Thanks Darren King. 1996-12-11 03:18:12 +00:00
Marc G. Fournier
07a65b2255 Commit of a *MAJOR* patch from Dan McGuirk <djm@indirect.com>
Changes:

        * Unique index capability works using the syntax 'create unique
          index'.

        * Duplicate OID's in the system tables are removed.  I put
          little scripts called 'duplicate_oids' and 'find_oid' in
          include/catalog that help to find and remove duplicate OID's.
          I also moved 'unused_oids' from backend/catalog to
          include/catalog, since it has to be in the same directory
          as the include files in order to work.

        * The backend tries converting the name of a function or aggregate
          to all lowercase if the original name given doesn't work (mostly
          for compatibility with ODBC).

        * You can 'SELECT NULL' to your heart's content.

        * I put my _bt_updateitem fix in instead, which uses
          _bt_insertonpg so that even if the new key is so big that
          the page has to be split, everything still works.

        * All literal references to system catalog OID's have been
          replaced with references to define'd constants from the catalog
          header files.

        * I added a couple of node copy functions.  I think this was a
          preliminary attempt to get rules to work.
1996-11-13 20:56:15 +00:00
Bruce Momjian
aaeef4d17d All external function definitions now have prototypes that are checked. 1996-11-10 03:06:38 +00:00
Bruce Momjian
4b2b8592a0 Compile and warning cleanup 1996-11-08 06:02:30 +00:00
Marc G. Fournier
83d93d437b Just a couple of small mods 1996-11-06 08:54:17 +00:00
Marc G. Fournier
eb501f1cd3 More Makefile cleanups
Add #include "postgres.h" as required
1996-10-31 10:42:56 +00:00
Bryan Henderson
b0d6f0aa63 Simplify make files, add full dependencies. 1996-10-27 09:55:05 +00:00
Marc G. Fournier
870be9fa8e Clean up th ecompile process by centralizing the include files
- code compile tested, but due to a yet unresolved problem with
          parse.h's creation, compile not completed...
1996-08-28 07:27:54 +00:00
Marc G. Fournier
a2740a455f There, now we support GiST...now what? :) 1996-08-26 06:32:06 +00:00
Marc G. Fournier
208a30f23d The patch does several things:
It adds a WITH OIDS option to the copy command, which allows
dumping and loading of oids.

        If a copy command tried to load in an oid that is greater than
its current system max oid, the system max oid is incremented.  No
checking is done to see if other backends are running and have cached
oids.

        pg_dump as its first step when using the -o (oid) option, will
copy in a dummy row to set the system max oid value so as rows are
loaded in, they are certain to be lower than the system oid.

        pg_dump now creates indexes at the end to speed loading


Submitted by:  Bruce Momjian <maillist@candle.pha.pa.us>
1996-08-24 20:49:41 +00:00
Marc G. Fournier
60b1123f5e Fixes:
Here's a couple more small fixes that I've made to make my runtime
checker happy with the code.  More along the lines of those that
I sent in the past, ie, a pointer to an array != the name of
an array.  The last patch is that I mailed about yesterday -- I got
two replies of "do it", so it's done.  As far as I can tell, however,
the function in question is never called by pg95, so either way
it can't hurt...

From:  "Kurt J. Lidl" <lidl@va.pubnix.com>
1996-08-19 13:32:14 +00:00
Marc G. Fournier
6c684b1847 Fixes:
Previously Postgres95 wouldn't accept 'order by' clauses with fields
referred to as '<table>.<field>', e.g.:

        select t1.field1, t2.field2 from table1 t1, table2 t2
                order by t2.field2;

This syntax is required by the ODBC SQL spec.

Submitted by: Dan McGuirk <mcguirk@indirect.com>
1996-08-06 16:38:03 +00:00
Marc G. Fournier
ab22b34891 Fixes:
While a normal SELECT statement can contain a GROUP BY clause, a cursor
declaration cannot. This was not the case in PG-1.0. Was there a good
reason why this was changed? Are cursors being phased out? Is there any way
to get data with just a SELECT (and without a DECLARE CURSOR ...)?

The patch below seems to fix things. If anyone can see a problem with it,
please let me know. Thanks.

Submitted by:  David Smith <dasmith@perseus.tufts.edu>
1996-08-06 16:27:59 +00:00
Marc G. Fournier
a05ed5bc11 Fixes:
In postgres95/src/backend/nodes/readfuncs, lines 1188 and 1189,
local_node->relname is taken to point to a NameType, while its
defined as a pointer to char. Both the casting to Name and the
call of namestrcpy should, IMHO, be changed appropriately (first
patch).

As far as I could see from the Linux signal header file,
a signal handler is declared as

        typedef void (*__sighandler_t)(int);

Few changes to postgres95/src/backend/storage/lmgr/proc.c seem
appropriate to comply with this.

Finally, postgres95/src/bin/pg_version/pg_version.c defines
a function GetDataHome (by default, returning an integer)
and returns NULL in the function, which isn't an integer...

Submitted by:  ernst.molitor@uni-bonn.de
1996-07-31 02:19:23 +00:00
Marc G. Fournier
4b3cb03104 fixes: It appears several routines use lcons to store integers rather than
pointers.

submitted by: bruce
1996-07-28 06:56:28 +00:00
Marc G. Fournier
d31084e9d1 Postgres95 1.01 Distribution - Virgin Sources 1996-07-09 06:22:35 +00:00