Bruce Momjian [Mon, 6 Apr 1998 00:32:26 +0000 (00:32 +0000)]
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.
Bruce Momjian [Sun, 5 Apr 1998 21:29:49 +0000 (21:29 +0000)]
this patch solve 2 problemes :
probleme number 1 :
- configure can find the library readline , but don't
find the header file . so in this case we don't use lib readline
.
probleme number 2 :
- when you have postgres 6.2.1 and readline installed
with the same prefix( and generally all your software ) . you
can compile the version 6.3 . I use this prefix , when configure
ask me for "Additional directories to search for include files"
.
( because there a conflict in the header when you
compile psql.c ) In this case, you must permut the sequence of
directive -I .
Bruce Momjian [Sun, 5 Apr 1998 20:28:23 +0000 (20:28 +0000)]
Here are 3 patches (all relative to the src directory) to help with
the configuration of v6.3.1. I have replaced the queries for
include/lib directories with --with configuration options. I have
also included a list of potential tcl/tk include directories directly
in the CPPFLAGS variable. As new versions are needed, these should
be added to the list in reverse numerical order (libraries are in
a separate list near the end). This greatly simplifies the later
checks if --with-tcl is set. I hope this solution works for
everyone.
I also added a check to disable the perl support if postgres was
not already installed (as per the instructions in the directory).
By the way, why must there be an installed pgsql to compile perl
support? This seems odd, at best.
Finally, I changed the Makefile in the libpgtcl interface to place
the shared libraries at the end of the list of files, not at the
beginning. With NetBSD at least, libraries are linked in order,
so the original sequence does not work.
Information completely translated to the SGML/DocBook source files
pgtcl.sgml, spi.sgml, trigger.sgml.
Online docs in html and postscript are the current versions.
Bruce Momjian [Fri, 3 Apr 1998 20:21:51 +0000 (20:21 +0000)]
A couple of weeks ago I submitted a patch to fix configure --with-tcl.
However somebody else also applied a patch to the same part of
configure to fix a different problem. So part of my patch was not
applied or got reversed or ... whatever.
The attached patch will restore configure --with-tcl to working
order and should remove a lot of the messages complaining about
tcl not working.
After applying the following patch there remain two
probable buffer overruns detected by Electric Fence during
the regression test.
I'll try find out what causes the remain two ones.
Marc G. Fournier [Tue, 31 Mar 1998 03:00:20 +0000 (03:00 +0000)]
Pointed out by: Doug Winterburn <dlw@seavme.xroads.com>
3) Add "#include "config.h" to src/interfaces/ecpg/preproc/pgc.l
to correct "strings.h not found". config.h has the proper define to
make this work and should probably be near the top of pgc.l before
the first include.
Marc G. Fournier [Tue, 31 Mar 1998 02:59:07 +0000 (02:59 +0000)]
Pointed out by: Doug Winterburn <dlw@seavme.xroads.com>
2) Add "#define gettimeofday(a,b) gettimeofday(a) to src/include/config.h
On the 88k SVR4, gettimeofday only has one argument. This is
checked for in a few other packages by configure, so there should
be some examples of the configure test out there.
Bruce Momjian [Mon, 30 Mar 1998 17:39:16 +0000 (17:39 +0000)]
This problem had nothing to do with the upgrades I made. There
was a 2000 character buffer allocated for results, and the files
you refer to produce a 2765 byte column called formsource. This
should not have worked with any version of libpgtcl.
Nevertheless, the limit is an artificial one, since there is no
need to use this intermediate buffer where it is being used and
abused.
Bruce Momjian [Mon, 30 Mar 1998 17:28:21 +0000 (17:28 +0000)]
The following uuencoded, gzip'd file will ...
1. Remove the char2, char4, char8 and char16 types from postgresql
2. Change references of char16 to name in the regression tests.
3. Rename the char16.sql regression test to name.sql. 4. Modify
the regression test scripts and outputs to match up.
Bruce Momjian [Mon, 30 Mar 1998 17:15:26 +0000 (17:15 +0000)]
The buffer overrun while creating sequences turns out to be a read
access overrun. For the sake of doing things properly here is a
patch which fixes it.
This patch is for the file backend/commands/sequence.c.
Bruce Momjian [Mon, 30 Mar 1998 16:47:35 +0000 (16:47 +0000)]
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).
Bruce Momjian [Mon, 30 Mar 1998 16:36:43 +0000 (16:36 +0000)]
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!!):
Bruce Momjian [Thu, 26 Mar 1998 23:46:14 +0000 (23:46 +0000)]
I have been troubled by a segmentation fault when reloading from
a dumpall. This has been happening when a second \connect is
encountered.
The faulty code was in fe-connect.c, where the memory for the user
password was freed, but the pointer itself was not set to NULL.
Later, the memory was reused and the password appeared not to be
empty, so that an attempt was made to reference it.
Bruce Momjian [Fri, 20 Mar 1998 04:22:54 +0000 (04:22 +0000)]
OK...here is a patch that will cause the magnetic disk storage
manager to not try to split files in 2 gig chunks. It will just
try to get another block.
If applied, everything is just as before. But if LET_OS_MANAGE_FILESIZE
is defined, the chaining disappears and the file just keeps on
going, and going, and going, til the OS barfs.
Bruce Momjian [Fri, 20 Mar 1998 04:17:34 +0000 (04:17 +0000)]
Sorry. I made above mistakes. "__svr4" should be "__svr4__" or
"__SVR4" as you pointed out. There is another file that has the
same mistakes. Included is a patche for include/c.h.
Bruce Momjian [Fri, 20 Mar 1998 03:55:52 +0000 (03:55 +0000)]
The real trick is to add -Dalpha to the CFLAGS setting. The changes
to main.c are only to add some extra includes to support some code
that's suddenly being used.
The #define ASSEMBLER is to prevent most of the code of sys/proc.h
from being included, as it ends up conflicting with some of the
postgresql definitions. This may or may not work on other versions
of Digital Unix.
Bruce Momjian [Fri, 20 Mar 1998 03:44:19 +0000 (03:44 +0000)]
> > I'm using text[] arrays. Some of my array elements have '"'
> > characters in them. Dumping and reloading using pg_dumpall >
> doesn't work with this and dumping the entire array and > > then
trying to parse it is hopeless.
Allow parsing expressions with ") -" (scan.l, scan.c only).
Make "TABLE" optional in "LOCK TABLE" command
and "... INTO TABLE..." clause.
Explicitly parse CREATE SEQUENCE options to allow a negative integer
as an argument; this is an artifact of unary minus handling in scan.l.
Add "PASSWORD" as an allowed column identifier.
These fixes will require a "make clean install" but not a dump/reload.
Marc G. Fournier [Sun, 15 Mar 1998 08:18:03 +0000 (08:18 +0000)]
From: hankin <hankin@consultco.com>
a while back I posted a patch for pg_ident, the patch worked but I didn't
diagnose the problem properly.
on my compiler(gcc2.7.2) this compiles with no errors...
char buf[1000]; if(buf != '\0') {
...but it doesn't compare '\0' with the first char of buf.
Marc G. Fournier [Sun, 15 Mar 1998 08:15:46 +0000 (08:15 +0000)]
Reply-To: Jordi MacDonald <jordi@spartanmedia.com>
There is an error in the configure script when using
--with-pgport= that will cause the compiled version of
PostgreSQL to no longer allow connections to the
new port and to treat shared memory improperly.
What happens is that if the port is changed, the configure
script defines DEF_PGPORT as "", which atoi() will return
as 0, which makes the IPC_KEY value 0. This then causes
semaphores to be allocated, but never released. Postgres
eventually returns from semget() with
"no space left on device". The source of this error could
easily be overlooked in version 6.3 since it is possible
to connect via UNIX domain sockets, and having DEF_PGPORT
defined as "0" would not be noticed until TCP was used.
Marc G. Fournier [Sun, 15 Mar 1998 08:11:11 +0000 (08:11 +0000)]
From: Randy Kunkee <kunkee@pluto.ops.NeoSoft.com>
The following patch is to src/interfaces/libpq of postgresql-6.3.
The purpose of the patch is to make the initialization of
const char *pgresStatus[] match the ExecStatusType enum.
Marc G. Fournier [Sun, 15 Mar 1998 08:09:37 +0000 (08:09 +0000)]
From: t-ishii@sra.co.jp
6.3 postmaster is supposed to work with pre 6.3 protocol. This is true
for little endian architecture servers. But for big endian machines
such as Sparc the backward compatibility function do not work.
Attached are patches to fix the problem.
Marc G. Fournier [Sun, 15 Mar 1998 08:07:01 +0000 (08:07 +0000)]
From: "Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
For substr() and substring() on the text data type, the relevant code is in
varlena.c. You are right, there is a problem. I have a patch which I will
apply to the source tree soon. The copy enclosed below probably does not
preserve tabs correctly so cannot be applied directly; the relevant change
is simply changing the ">=" to ">"...
Marc G. Fournier [Sun, 15 Mar 1998 08:03:00 +0000 (08:03 +0000)]
From: Randy Kunkee <kunkee@pluto.ops.NeoSoft.com>
It is my hope that the following "patches" to libpgtcl get included
in the next release.
See the update to the README file to get a full description of the changes.
This version of libpgtcl is completely interpreter-safe, implements the
database connection handle as a channel (no events yet, but will make it
a lot easier to do fileevents on it in the future), and supports the SQL
"copy table to stdout" and "copy table from stdin" commands, with the
I/O being from and to the connection handle. The connection and result
handles are formatted in a way to make access to the tables more efficient.
Marc G. Fournier [Sun, 15 Mar 1998 07:53:03 +0000 (07:53 +0000)]
From: t-ishii@sra.co.jp
Included are patches intended for allowing PostgreSQL to handle
multi-byte charachter sets such as EUC(Extende Unix Code), Unicode and
Mule internal code. With the MB patch you can use multi-byte character
sets in regexp and LIKE. The encoding system chosen is determined at
the compile time.
To enable the MB extension, you need to define a variable "MB" in
Makefile.global or in Makefile.custom. For further information please
take a look at README.mb under doc directory.
(Note that unlike "jp patch" I do not use modified GNU regexp any
more. I changed Henry Spencer's regexp coming with PostgreSQL.)
Marc G. Fournier [Sun, 15 Mar 1998 07:39:04 +0000 (07:39 +0000)]
From: t-ishii@sra.co.jp
Included are patches intended for allowing PostgreSQL to handle
multi-byte charachter sets such as EUC(Extende Unix Code), Unicode and
Mule internal code. With the MB patch you can use multi-byte character
sets in regexp and LIKE. The encoding system chosen is determined at
the compile time.
To enable the MB extension, you need to define a variable "MB" in
Makefile.global or in Makefile.custom. For further information please
take a look at README.mb under doc directory.
(Note that unlike "jp patch" I do not use modified GNU regexp any
more. I changed Henry Spencer's regexp coming with PostgreSQL.)
Marc G. Fournier [Sun, 15 Mar 1998 07:12:07 +0000 (07:12 +0000)]
From: Peter T Mount <patches@maidast.demon.co.uk>
Ok, this fixes three things:
1. It seems (from tests submitted by two people with JBuilder) that
JBuilder expects a responce from ResultSetMetaData.getPrecision() &
getScale() when used on non numeric types. This patch makes these
methods return 0, instead of throwing an exception.
2. Fixes a small bug where getting the postgresql type name returns null.
3. Fixes a problem with ResultSet.getObject() where getting it's string
value returns null if you case the object as (PGobject), but returns
the value if you case it as it's self.