Commit Graph

24217 Commits

Author SHA1 Message Date
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 3c47cdeb5a From: Dan McGuirk <mcguirk@indirect.com>
fixed the spelling of 'nonexistent' in a few places...
1996-08-19 01:53:39 +00:00
Marc G. Fournier f796387b60 |From: Dan McGuirk <mcguirk@indirect.com>
|
|This patch fixes a backend crash that happens sometimes when you try to
|join on a field that contains NULL in some rows.  Postgres tries to
|compute a hash value of the field you're joining on, but when the field
|is NULL, the pointer it thinks is pointing to the data is really just
|pointing to random memory.  This forces the hash value of NULL to be 0.
|
|It seems that nothing matches NULL on joins, even other NULL's (with or
|without this patch).  Is that what's supposed to happen?
|
1996-08-19 01:52:36 +00:00
Marc G. Fournier 1960a3b965 changed missed err() change to err_out()
Found/submittd by David Bennett
1996-08-17 06:41:10 +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 d6fa4d95cd Fixes:
CLUSTER command couldn't rename correctly the new created heap relation.
The table base name resulted in some "temp_XXXX" instead of the correct
base name.

Submitted by: Dirk Koeser <koeser@informatik.uni-rostock.de>
1996-08-15 07:39:24 +00:00
Marc G. Fournier 4844adc888 Fixes;
Postgres is not able to cluster a relation on which an rtree index is
 defined. Postmaster gives the following error message:

 Too Large Allocation Request("!(0 < (size) && (size) <= (0xfffffff)):size=0
 [0x0]", File:"/export/home/postgres/src/backend/utils/mmgr/mcxt.c", Line: 220)
  !(0 <(size) && (size) <= (0xfffffff)) (0) [No such file or directory]

Submitted by: Dirk Koeser <koeser@informatik.uni-rostock.de>
1996-08-15 07:30:22 +00:00
Marc G. Fournier e7a110b418 This patch can be installed as part of 1.02.1 so people can properly
pg_dump and load to 2.0.  I haven't gotten any feedback on whether
people want it, so I am submitting it for others to decide.  I would
recommend an install in 1.02.1.

I had said that the 2.0 pg_dump could dump a 1.02.1 database, but I was
wrong.  The copy is actually performed by the backend, and the 2.0
database will not be able to read 1.02.1 databases because of the new
system columns.

This patch does several things.  It copies nulls out as \N, so they can
be distinguished from '' strings.  It fixes a problem where backslashes
in the input stream were not output as double-backslashes.  Without this
patch, backslashes copied out were deleted upon input, or interpreted as
special characters.  Third, input is now terminated by backslash-period.
This can not be part of a normal input stream.

I tested this by creating a database with all sorts of nulls, backslash,
and period fields and dumped the database and reloaded into a new
database and compared them.

Submitted by: Bruce
1996-08-14 05:33:11 +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 988a9adfbd This is a fix to be included in 1.02.1. It adds a tip for people
getting semaphore or shared memory errors.

Submitted by: bryanh@giraffe.netgate.net (Bryan Henderson)
1996-08-14 05:01:53 +00:00
Marc G. Fournier 80d0c4ffd3 The following patch makes postmaster -D work. -D specifies a different PGDATA
directory.  The code that looks for the pg_hba file doesn't use it, though,
so the postmaster uses the wrong pg_hba file.  Also, when the postmaster
looks in one directory and the user thinks it is looking in another
directory, the error messages don't give enough information to solve the
problem.  I extended the error message for this.


Submitted by: Bryan Henderson <bryanh@giraffe.netgate.net>
1996-08-14 04:51:34 +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 9da9c0915a Fixes:
Here's a small patch that my run-time checker whines about
incessantly.  The justification for the patch is along the
lines of passing a NULL is allowed if you have an
arguement that is a *POINTER* to something, but if
the arguement is an array reference, it's not really
a "pointer", so it can't be NULL.

If you question this, I refer you to
<URL:http://www.va.pubnix.com/staff/djm/lore/arrays-are-not-pointers>

Anyways, here's the patch:

-Kurt

Submitted by: "Kurt J. Lidl" <lidl@va.pubnix.com>
1996-08-13 01:32:26 +00:00
Marc G. Fournier 59f29714aa Fixes:
This patch forces postgres95 to assume any floating-point value is a
float8.  It removes the requirement that you cast all floating-point
constants to float8.

We can remove alot of casts in the regression test after we are sure
this works.

If I have missed anything, would someone let me know.  I have tested
inserts of floating-point values into float8 fields, and it worked well.
Casting the number to float4 showed the same precision loss as previous
uncast values showed.

Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
1996-08-13 01:29:34 +00:00
Marc G. Fournier 9b7eb28ea5 Fixes:
There is a support routine in the standard 4.4BSD C library
called "err()".  There is also a utility routine in
.../src/backend/bootstrap/bootstrap.c
with the same name.

Here's a patch that renames the pg95 routine to something a little
more sane.  As a bonus, one more bit of system-specific code leaves
the system...

Submitted by: "Kurt J. Lidl" <lidl@va.pubnix.com>
1996-08-13 01:28:29 +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 ae4725295a Fix an Inccorect Error Message...
Submitted by: Dan McGuirk <mcguirk@indirect.com>
1996-08-09 19:06:59 +00:00
Marc G. Fournier bb0bdfd101 Fixes:
I've enclosed two patches.  The first affects Solaris compilability.  The
bug stems from netdb.h (where MAXHOSTNAMELEN is defined on a stock
system).  If the user has installed the header files from BIND 4.9.x,
there will be no definition of MAXHOSTNAMELEN.  The patch will, if all
else fails, try to include <arpa/nameser.h> and set MAXHOSTNAMELEN to
MAXDNAME, which is 256 (just like MAXHOSTNAMELEN on a stock system).

The second patch adds aliases for "ISNULL" to "IS NULL" and likewise for
"NOTNULL" to "IS NOT NULL".  I have not removed the postgres specific
ISNULL and NOTNULL.  I noticed this on the TODO list, and figured it would
be easy to remove.

The full semantics are:
        [ expression IS NULL ]
        [ expression IS NOT NULL ]

--Jason


Submitted by: Jason Wright <jason@oozoo.vnet.net>
1996-08-06 16:43:41 +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 132e9159eb Fixes:
Someone asked me if the bpchar type could be extended to do
case-insensitive regular expression searches.


Submitted by: "Alistair G. Crooks" <azcb0@juts.ccc.amdahl.com>
1996-08-05 00:25:07 +00:00
Marc G. Fournier 54f69a954c Fix a bug in pg_class
submitted by: "Peter Daum" <gator@cs.tu-berlin.de>
1996-08-04 22:00:13 +00:00
Marc G. Fournier 423a715989 Quick patch for compiling under BSD/OS 2.0 from Bruce 1996-08-04 21:03:23 +00:00
Marc G. Fournier 164ef6ff2b Fixes:
Originally, I thought the problem was caused by a function that gets
called as a normal function where we want to return a value, and as a
signal handler where we need to have it accept a parameter (the signal
number) and it returns nothing, I was going to case the function name in
the signal call as (void (*)(int)).

Looking at all the source, it turns out this function only gets used as
a signal handler, so I set an int parameter and return void.

I have removed the Linux defines because they are not needed.  BSD let
this sloppiness slide.  Linux gave a compile error.


Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
1996-08-01 05:11:33 +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 9c0f89c4a4 More patches for BSDi from Bruce 1996-07-31 18:43:58 +00:00
Marc G. Fournier c317bdc9fd Re-arrange KRBVERS postition
Suggested by: Daniel Kalchev <daniel@digsys.bg>
1996-07-31 17:19:49 +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 74cdf92868 Fixes:
>   INDEXED searches in some cases DO NOT WORK.
>   Although simple search expressions (i.e. with a constant value on
> the right side of an operator) work, performing a join (by putting
> a field of some other table on the right side of an operator) produces
> empty output.
>   WITHOUT indices, everything works fine.
>

submitted by: "Vadim B. Mikheev" <root@ais.sable.krasnoyarsk.su>
1996-07-30 07:56:04 +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 519496b63e More cleandups from: "Kurt J. Lidl" <lidl@va.pubnix.com> 1996-07-30 07:41:38 +00:00
Marc G. Fournier 48cde8d83b fix a redeclaration error
submitted by Kurt
1996-07-29 20:49:02 +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 95b6f6ea33 Missed a small patch fro mBruce for BSDi 1996-07-26 20:39:04 +00:00
Marc G. Fournier e4b2558fa3 Minor bug fix 1996-07-26 20:03:21 +00:00
Marc G. Fournier 8a372d202f Add in port to DG/UX
Submitted by: "Brian E. Gallew" <geek+@cmu.edu>
1996-07-25 20:45:05 +00:00
Marc G. Fournier 5315d37c20 Fix applied for NESTLOOP bug
submitted by: vadim@sable.krasnoyarsk.su (Vadim B. Mikheev)
1996-07-25 20:36:46 +00:00
Marc G. Fournier 14cd0ca3bd modified i386_solaris port
submitted by: dr. george
1996-07-25 19:48:24 +00:00
Marc G. Fournier 31cae34d07 multiple define of 'union semun' removed
submitted by: dr. george
1996-07-25 19:45:31 +00:00
Marc G. Fournier 10369ad7b2 removed tas.s refernce 1996-07-25 07:27:08 +00:00
Marc G. Fournier 18367ced1b Ack, missed two files from the merge...looks like a .11 is goin gto have
to go out after all :(
1996-07-23 05:51:29 +00:00
Marc G. Fournier b619cb09d9 iBrought in a fix for backend crashes
Submitted by: "Vadim B. Mikheev" <vadim@sable.krasnoyarsk.su>
1996-07-23 05:44:10 +00:00
Marc G. Fournier 7344d69898 Finished merging in src/backend from Dr. George's source tree 1996-07-23 02:23:54 +00:00
Marc G. Fournier e11744e164 More of Dr. George's changes...
- src/backend/catalog/*
                - no changes
        - src/backend/executor/*
                - change how nodeHash.c handles running out of memory
        - src/backend/optimizer/*
                - mostly cosmetic changes
1996-07-22 23:30:57 +00:00
Marc G. Fournier 5108a5b320 More merges from Dr. George's tree...
- src/backend/tcop/*
                - cosmetic changes to OPENLINK patches
        - src/backend/storage/*
                - more changes, mostly cosmetic
        - src/backend/ports/*
                - merge in patches for aix and i386_solaris
1996-07-22 23:00:26 +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 544e802910 Fixes:
Hash indices for some data types don't work, for example for time and date.

- submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-07-20 08:19:13 +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 20288400f3 Fixes:
I have written some patches which add support for NULLs to Postgres95.
In fact support for NULLs was already present in postgres, but it had been
disabled because not completely debugged, I believe. My patches simply add
some checks here and there. To enable the new code you must add -DNULL_PATCH
to CFLAGS in Makefile.global. After recompiling you can do things like:

insert into a (x, y) values (1, NULL);
update a set x = NULL where x = 0;

You can't still use a "where x=NULL" clause, you must use ISNULL instead.
This could probably be an easy fix to do.




Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-07-19 07:24:11 +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 6562fa851e Fixes:
'select distinct on' causes backend to crash

submitted by: Chris Dunlop    chris@onthe.net.au
1996-07-19 06:27:59 +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 89ad633897 Fixes compile errors with irix5 port
Submitted by: Thomas van Reimersdahl <reimersd@dali.techinfo.rwth-aachen.de>
1996-07-19 05:54:17 +00:00
Marc G. Fournier 54857ad1a7 Fixes:
It is not possible to define attributes as arrays of date or time, the
type _time and _date are not defined.

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-07-19 05:21:28 +00:00
Marc G. Fournier 1d4a115a37 Fixes:
The type _char16 (array of char16) is incorrectly defined as array of name
and values longer than 16 chars are stored as names and not truncated to 16
bytes as they should be.

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-07-19 05:12:40 +00:00
Marc G. Fournier bc0bd47c6a Fixes: In the solaris port the file descriptors are hard coded to 20 (from the
include file sys/param.h

Submitted by:  michael.siebenborn@ae3.Hypo.DE (Michael Siebenborn (6929))
1996-07-18 04:59:42 +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 e5eb859446 fix: During a BSD/OS(BSDI) 2.1 compile, I got errors about undefined
S_LOCK_'s during the postgres link phase.

submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-16 06:53:41 +00:00
Marc G. Fournier d7a1ce7af7 adds: case insensitive regexp for varchar
From: azcb0@sde.uts.amdahl.com
1996-07-15 19:32:33 +00:00
Marc G. Fournier faf21935d1 fsync patch from openlink 1996-07-15 19:22:17 +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 25bb71835f Fix: Can't drop tables with names longer than 16 characters. 1996-07-09 06:35:38 +00:00
Marc G. Fournier d31084e9d1 Postgres95 1.01 Distribution - Virgin Sources 1996-07-09 06:22:35 +00:00