Commit Graph

1050 Commits

Author SHA1 Message Date
Bruce Momjian 6eb0525185 Prevent under/over flow of float8 constants in parser. Small regression fix. 1997-02-19 20:11:05 +00:00
Bruce Momjian 31c8e94b34 Remove WIN32 defines. They never worked. 1997-02-14 04:19:07 +00:00
Marc G. Fournier d62267c707 Improvements to the ultrix port, in particular a bunch of compiler
quieting prototyping in port/ultrix4.h

Submitted by: Erik Bertelsen <erik@sockdev.uni-c.dk>
1997-02-13 09:54:14 +00:00
Bruce Momjian 2300ac0dc4 Add attribute optimization statistics. 1997-02-07 16:24:12 +00:00
Marc G. Fournier 8d3d5d2e2f Slight change to nabstime.c so that configure is able to handle a system
whereby timezone isn't an int, but tzset() exists...

This isn't a definitive fix, as there is probably an easier way of
fixing the bug...
1997-01-27 01:51:26 +00:00
Marc G. Fournier 632c44d829 Bring in a patch from Keith Parks to move the use of European dates
from a #define to a run-time option '-e'

Man page was updated to reflect new option
1997-01-26 15:32:28 +00:00
Marc G. Fournier 0a16069901 Convert NEED_{RINT,CBRT,ISINF} to HAVE_* in prepration for configure... 1997-01-24 18:17:37 +00:00
Marc G. Fournier 3ffd5694dd Replace occurances of USE_{LIMITS,VALUES}_H with HAVE_* in preparation
for switch over to configure
1997-01-24 18:00:48 +00:00
Marc G. Fournier 6850a96933 Another change from /usr/include/machine/limits.h to just limits.h 1997-01-22 04:56:34 +00:00
Bruce Momjian 6ffae202a9 Add missing #. 1997-01-18 17:36:02 +00:00
Vadim B. Mikheev 3677e86f7f textin fixed: no more zero-byte (thanks, Erich) 1997-01-16 03:53:51 +00:00
Marc G. Fournier f02bd93350 Added postgres.h include to quiet down the HPUX ports...
POinted out by: Martin S. Utesch <utesch@aut.tu-freiberg.de>
1997-01-15 08:21:14 +00:00
Bryan Henderson 05b0f22900 Eliminate dupliclate definition of external variables reldesc and DataDir.
Some compilers recognize this error.
1997-01-14 08:05:36 +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 63b22d8aa9 cleanup for LINUX_ELF 1997-01-10 18:55:24 +00:00
Bruce Momjian 37c168f6ba timeb.h only used when not using POSIX_TIME 1997-01-10 18:22:41 +00:00
Vadim B. Mikheev f91b26a5da #include <postgres.h> moved upper 1997-01-09 03:38:14 +00:00
Bryan Henderson 3c4b21493d Use proper types so it compiles on DEC C89. Thanks Erik Bertelson. 1997-01-08 08:39:10 +00:00
Bryan Henderson 5e98c40129 Change the way ipc.h is included because sys/ipc.h on Ultrix is broken. 1997-01-08 08:33:07 +00:00
Marc G. Fournier 151d484ca5 Minor changes for NeXT compile
Submitted by: Ovidiu Predescu <ovidiu@bx.logicnet.ro>
1997-01-06 00:20:13 +00:00
Marc G. Fournier 3d53b87369 More config.h syncing for limits.h 1997-01-06 00:15:26 +00:00
Bruce Momjian cb6cb7745d Here's the final set of patches to 6.0 (sup'd on 27/12/96) that allow a full
gmake of the code without interruption.

There's also some tidy-up of the MAXPATHLEN stuff based on the assumption that
all supported platforms have MAXPATHLEN defined in <sys/param.h>.

(The only unknowns for the above are AIX and IRIX5.)
1996-12-28 02:13:05 +00:00
Vadim B. Mikheev 4a5135c34e There was JMP_BUF defined in config.h. And SIGJMP_BUF later.
And now - JMP_BUF again. Is it enough, folks ?

Fixed again:
cc1: warnings being treated as errors
exc.c: In function 'ExcRaise':
exc.c:187: warning: passing arg 1 of 'Longjmp' from incompatible pointer type
gmake[3]: *** [exc.o] Error 1
1996-12-27 13:13:58 +00:00
Bryan Henderson ec105b6026 Put sys/types.h before sys/timeb.h so Ultrix compiles. 1996-12-16 03:34:52 +00:00
Bryan Henderson 9fc7250d3a Make compile on AIX, Alpha OSF. Thanks Darren King, Igor Notanzon. 1996-12-15 09:05:53 +00:00
Vadim B. Mikheev 290d3b5198 Fix over fix: JMP_BUF gone away and we have SIGJMP_BUF now.
Excuse me.
1996-12-14 08:26:34 +00:00
Vadim B. Mikheev 4556a50cf8 Avoiding:
cc1: warnings being treated as errors
datum.c: In function `DatumGetSize':
datum.c:57: warning: unsigned value >= 0 is always 1
gmake[3]: *** [datum.o] Error 1

There was:
    if (byVal) {
        if (len >= 0 && len <= sizeof(Datum)) {

but len has type Size (unsigned int) and so now there is:
    if (byVal) {
        if (len <= sizeof(Datum)) {
1996-12-14 07:56:05 +00:00
Vadim B. Mikheev 25eb9e2a66 Avoiding
cc1: warnings being treated as errors
exc.c: In function 'ExcRaise':
exc.c:186: warning: passing arg 1 of 'Longjmp' from incompatible pointer type
gmake[3]: *** [exc.o] Error 1

Now we have:
#if defined (JMP_BUF)
        longjmp(efp->context, 1);
#else
        siglongjmp(efp->context, 1);
#endif
1996-12-14 05:55:27 +00:00
Bryan Henderson 9005a38bdb Change portname "sparc" to "sunos4" and change some portname dependencies to
feature dependencies.  Thanks Kurt J. Lidl.
1996-12-04 03:06:33 +00:00
Bryan Henderson 9c0afeabb7 More stuff to make it compile on various ports. 1996-11-27 08:16:44 +00:00
Bryan Henderson 46d58fba33 Make it compile on Ultrix. Thanks Erik Bertelson. 1996-11-26 03:20:35 +00:00
Bryan Henderson 092c7a6be5 Typecasts, etc. to make compile work on AIX. Thanks Darren King.. 1996-11-24 04:44:24 +00:00
Bruce Momjian c4d6bda2c5 There is a bug in aclinsert3 in the code which update the acl arrays.
When an acl item is added or updated the new entry is deleted if it has no
permissions and the acl array is shrinked. This is is done by decrementing
the number of items without updating the corresponding array size.
The array with the incorrect size is later read by pg_aclcheck and the entry
count is used to allocate a new array while the array size is used to copy
the old one. This causes a memory corruption and a backend crash.
This happens only to normal user as the administrator bypasses acl checks.
Massimo Dal Zotto
1996-11-20 22:53:10 +00:00
Bryan Henderson 13312a007d The routines in magic.c have moved to the more accessible version.c. 1996-11-19 02:55:37 +00:00
Bruce Momjian 003b76f9ac Fix for error when viewing group access privs. 1996-11-17 04:26:59 +00:00
Marc G. Fournier 8abc490181 Features added:
* Wrote max(date) and min(date) aggregates
* Wrote operator "-" for date; date - date yields number of days
  difference
* Wrote operator+(date,int) and operator-(date,int); the int is the
  number of days.  Each operator returns a new date.


By: Tom Tromey <tromey@creche.cygnus.com>
1996-11-14 21:39:14 +00:00
Bryan Henderson f64b840387 Remove most compile-time options, add a few runtime options to make up for it.
In particular, no more compiled-in default for PGDATA or LIBDIR.  Commands
that need them need either invocation options or environment variables.
PGPORT default is hardcoded as 5432, but overrideable with options or
environment variables.
1996-11-14 10:25:54 +00:00
Bryan Henderson 6b135c9391 Use port-protos.h instead of trying to declare random() and srandom()
explicitly.
1996-11-14 08:23:31 +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
Bryan Henderson 17befd6c69 Use new utils/version.c instead of backend/utils/init/magic.c. 1996-11-12 06:47:10 +00:00
Marc G. Fournier 6913c8b4a4 Add an abort() call to ExceptionalCondition so that is Assert is
called, it dumps core...

ABORT_ON_ASSERT must be defined, as I don't know if this is the correct
way to do this...
1996-11-11 11:49:40 +00:00
Marc G. Fournier 9fc64aefe1 change include c.h to postgres.h 1996-11-11 11:29:15 +00:00
Bruce Momjian aaeef4d17d All external function definitions now have prototypes that are checked. 1996-11-10 03:06:38 +00:00
Bryan Henderson bf5cbbf789 Quiet compiler warnings. 1996-11-10 02:27:15 +00:00
Bryan Henderson 0e5ab3655c Remove #include <regex.h> so it compiles on systems with GNU regex library. 1996-11-10 01:20:44 +00:00
Bruce Momjian a0990e1884 Makefile cleanup after reorganization 1996-11-09 06:24:51 +00:00
Bruce Momjian c9c0e111b8 More compile cleanups 1996-11-08 20:46:33 +00:00
Bruce Momjian 4b2b8592a0 Compile and warning cleanup 1996-11-08 06:02:30 +00:00
Marc G. Fournier 0020e8790d Another directory that compiles with no errors, and few warnings 1996-11-06 10:32:10 +00:00
Marc G. Fournier b6e640f829 Make sure that #include <postgres.h> is included in fmgrtab.c 1996-11-06 10:22:13 +00:00
Marc G. Fournier ce4c0ce1de Some compile failure fixes from Keith Parks <emkxp01@mtcc.demon.co.uk> 1996-11-06 06:52:23 +00:00
Bruce Momjian 18bbad7696 Remove OPENLINK define 1996-11-04 04:53:51 +00:00
Bruce Momjian 8edbc3bde4 Remove ARRAY_PATCH define 1996-11-04 04:19:55 +00:00
Bruce Momjian e43dfad289 Remove ESCAPE_PATCH define 1996-11-04 04:05:16 +00:00
Bruce Momjian 7e42f4814d Removed PORTNAME_. Use OS version only. 1996-11-04 04:00:56 +00:00
Marc G. Fournier d2aa40517a Cleaned up include headers 1996-11-03 23:46:28 +00:00
Bryan Henderson 5a58dabbbc Include Makefile.global so fmgrtab.c compiles properly. Thanks Keith Parks. 1996-11-03 09:28:31 +00:00
Marc G. Fournier c9002ecb21 Produce a clean compile of backend... 1996-11-03 06:54:38 +00:00
Bryan Henderson 763adb5235 Convenience routine for checking superuser status. 1996-11-02 02:06:47 +00:00
Bryan Henderson 675740a8f3 Add misc subdirectory. 1996-11-02 02:03:50 +00:00
Marc G. Fournier df6a9e633c more removal of PORTNAME_* 1996-10-31 10:23:28 +00:00
Marc G. Fournier 14352a3ef6 .h files shouldn't include .h files, .c files should contain .h files...
remove postgres.h from fmgr.h creation
1996-10-31 07:37:57 +00:00
Bruce Momjian 3d7fe6c97c Added needed include file. 1996-10-31 05:58:01 +00:00
Bryan Henderson b0d6f0aa63 Simplify make files, add full dependencies. 1996-10-27 09:55:05 +00:00
Bryan Henderson 1e39d14ff3 Correct #if statement so it compiles on Solaris. Thanks Keith Parks. 1996-10-26 05:03:24 +00:00
Bryan Henderson ec86e4b95b Use EUROPEAN_DATES instead of EUROPEAN_STYLE 1996-10-25 06:02:52 +00:00
Marc G. Fournier f6f8ca4970 Fixes: Growing backend when using nested function calls
Submitted by: wieck@sapserv.debis.de (Jan Wieck)
1996-10-24 07:59:46 +00:00
Marc G. Fournier 20b4c46e26 Fixes: Errors when PQexec() in backend creates temp
relations and transaction is aborted

Submitted by: wieck@sapserv.debis.de (Jan Wieck)
1996-10-24 07:55:54 +00:00
Marc G. Fournier f36b2560a4 Major code cleanups from D'arcy (-Wall -Werror) 1996-10-23 07:42:13 +00:00
Marc G. Fournier a839456c41 Move "port specific" #ifdefs out of here and into config.h
- created a HAVE_TZSET define for this purpose
1996-10-17 23:59:45 +00:00
Bruce Momjian 81f2f81960 Removed const warning. 1996-10-13 18:39:41 +00:00
Bruce Momjian 54612f5141 D'Arcy change. 1996-10-13 18:38:51 +00:00
Marc G. Fournier de466eb8f4 Mostly adding "const" keyword and making some functions static.
Submitted by: D'Arcy Cain
1996-10-07 03:30:40 +00:00
Marc G. Fournier d00f621d7b diff -ru ../../../orig/postgres95/src/backend/utils/adt/varlena.c
./utils/adt/varlena.c
- --- ../../../orig/postgres95/src/backend/utils/adt/varlena.c    Mon Jul 22
23:56:04 1996
+++ ./utils/adt/varlena.c       Tue Sep 17 15:12:55 1996
@@ -166,7 +166,7 @@

     if (inputText == NULL)
        return(NULL);
- -    len = strlen(inputText) + VARHDRSZ;
+    len = strlen(inputText) + VARHDRSZ + 1 /* terminating 0 */;
     result = (struct varlena *) palloc(len);
     VARSIZE(result) = len;
     memmove(VARDATA(result), inputText, len - VARHDRSZ);


Submitted by: skimo@breughel.ufsia.ac.be (Sven Verdoolaege)
1996-09-23 08:31:01 +00:00
Marc G. Fournier 3c237e7347 I have two small patches which correct some very obscure bug in the parser
of the array constants and in one of the loadable modules I posted some time
ago.

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-09-19 20:05:59 +00:00
Marc G. Fournier f2f53aee0f Fixes:
The comparison routines for text and char data type give incorrect results
if the input data contains characters greater than 127.  As these routines
perform the comparison using signed char variables all character codes
greater than 127 are interpreted as less than 0.  These codes are used to
encode the iso8859 char sets.
The other text-like data types seem to work as expected as they use unsigned
chars in comparisons.


Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-09-10 06:41:38 +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 f634c14c9e Path to pg_proc.h to create fmgrtab.c change to include/catalog 1996-08-28 02:13:10 +00:00
Marc G. Fournier b8a0bb68c9 Should finish cleaning out the machine.h includes 1996-08-27 22:21:34 +00:00
Marc G. Fournier 321b8c80fd At this rate, maybe next year sometime I'll get this done...
Goals: reduce the difficulty of porting from platform to platform,
       release to release, but moving as much as possible into config.h
1996-08-27 07:32:33 +00:00
Marc G. Fournier 491b9b89c4 The patch that is applied at the end of the email makes sure that these
conditions are always met. The patch can be applied to any version
of Postgres95 from 1.02 to 1.05. After applying the patch, queries
using indices on bpchar and varchar fields should (hopefully ;-) )
always return the same tuple set regardless to the fact whether
indices are used or not.

Submitted by: Gerhard Reithofer <tbr_laa@AON.AT>
1996-08-26 20:38: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 926a066d40 Added a SVR4 port
---

below my signature, there are a coupls of diffs and files in a shell
archive, which were needed to build postgres95 1.02 on Siemens Nixdorfs
MIPS based SINIX systems. Except for the compiler switches "-W0" and
"-LD-Blargedynsym" these diffs should also apply for other SVR4 based
systems. The changes in "Makefile.global" and "genbki.sh" can probably
be ignored (I needed gawk, to make the script run).

There is one bugfix thou. In "src/backend/parser/sysfunc.c" the
function in this file didn't honor the EUROPEAN_DATES ifdef.

---

Submitted by:  Frank Ridderbusch <ridderbusch.pad@sni.de>
1996-08-19 13:52:54 +00:00
Marc G. Fournier a4402ecc8c Fixes a bug in 'create index'
Submitted by: Dan McGuirk <mcguirk@indirect.com>
1996-08-15 07:42:52 +00:00
Marc G. Fournier 15a645014a I grabbed the latest version of the source code via sup this morning,
and found out that one of the patches is a show stopper for
compiling under a strict ansi package.

Please make sure the following fix makes it into the 1.02.1
release...

Thanks.

-Kurt
1996-08-14 05:03:47 +00:00
Marc G. Fournier a721c91ade More code cleanups
Submitted by: darcy@druid.druid.com (D'Arcy J.M. Cain)
1996-08-13 01:36:50 +00:00
Marc G. Fournier 5bd4485c8e More code cleanups
Submitted by:  darcy@druid.druid.com (D'Arcy J.M. Cain)
1996-08-13 01:27:21 +00:00
Marc G. Fournier 7bdd8dcac3 This prevent gcc from complaining about casting a short to a char * and
fixes another complaint.

More fixes from Bruce...
1996-07-31 18:48:16 +00:00
Marc G. Fournier e5e12f6405 More cleanups by "Kurt J. Lidl" <lidl@va.pubnix.com> 1996-07-30 07:47:58 +00:00
Marc G. Fournier 18a7989e1a - merging in Dr. George's tree with ours
- src/backend/access
                - no changes
        - src/backend/utils
                - mostly cosmetic changes
                - ESCAPE_PATCH Added
        - src/Makefile.global changes merged
1996-07-22 21:58:28 +00:00
Marc G. Fournier ffae4ebde9 Brought in NEOSOFT's port to i386_solaris
Submitted by: Randy Kunkee <kunkee@Starbase.NeoSoft.COM>
1996-07-20 08:36:33 +00:00
Marc G. Fournier 94215d51c8 Fixes:
The updating of array fields is broken in Postgres95-1.01, An array can
be only replaced with a new array but not have some elements modified.
This is caused by two bugs in the parser and in the array utilities.
Furthermore it is not possible to update array with a base type of
variable length.


- submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-07-20 07:59:41 +00:00
Marc G. Fournier 83adddfcc3 - improve date/time parsing routines
- submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-07-19 07:19:56 +00:00
Marc G. Fournier a7cfd65532 Fixes:
Select queries with an isnull or notnull clause, like "select * where
somefield isnull", crash the backend if the table has at least one index.
If the indices are deleted the queries work again. Also the explain
command fail in the same way.
The is caused by a bug in subroutine of the optimizer which doesn't check
null values in the clauses.

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-07-19 07:14:14 +00:00
Marc G. Fournier 9bffaade96 Fixes:
This is a patch to prevent an endless loop occuring in the Postgres backend
when a 'warning' error condition generates another warning error contition
in the handler code.

Submitted by: Chris Dunlop, <chris@onthe.net.au>
1996-07-19 06:13:58 +00:00
Marc G. Fournier 64bfa0487b fixes for textcat(), but headers were missing from archive :( 1996-07-19 06:08:21 +00:00
Marc G. Fournier 55aab6a434 fix: BSDi 2.1 requires a port seperate from BSDi 2.0{.1}
submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-16 07:13:58 +00:00
Marc G. Fournier d838e30f13 Submitted by Openlink, requires -DOPENLINK_PATCHES in Makefile.global
varchar.diff
------------
This patch was necessary for the OpenLink Postgres Database Agent.
I think this fixes a bug anyway.

The following query demonstrates this bug:

  create table foo (bar varchar);
  insert into foo values ('');          -- no problem
  select * from foo where bar = '';     -- fails
1996-07-15 19:11:23 +00:00
Marc G. Fournier 950b6ab022 Fixes: Using LIKE or ~ operator on text type files which are null valued
causes segmentation fault.

Thanks to: Salvador Ortiz Garcia, Robert Patrick, Paul 'Shag' Walmsley,
           and James Cooper for finding and fixing the problem.
1996-07-09 06:39:19 +00:00
Marc G. Fournier d31084e9d1 Postgres95 1.01 Distribution - Virgin Sources 1996-07-09 06:22:35 +00:00