summaryrefslogtreecommitdiff
path: root/src/interfaces
AgeCommit message (Collapse)Author
1997-06-06From: Igor <igor@sba.miami.edu>Marc G. Fournier
Subject: [PATCHES] More psql and libpq patches Well..these would be the last patches until the release (I hope)... I ran the regression tests while watching psql under purify, and it did not leak even one byte. In this patch: * Plugged a major leak when PSQL reads files for input (either through \i options or through -f option) * Fixed the one remaining leak in PSQL in not clearing PGresult *results everywhere it is supposed to. (Thanks Tymm) * Fixed A small leak in PSQL not clearing all the PGsettings correctly. * A not-so-obvious (but small) leak in Libpq when PQsetdb fails for any reason. * Added \n to some Libpq error messages to make them easier to digest.. * Finally, added /* PURIFY */ comment to some of the code indicating the reason for why it was added/changed...for future developers.
1997-06-02*** empty log message ***Edmund Mergl
1997-06-01From: Igor <igor@sba.miami.edu>Marc G. Fournier
Subject: [PATCHES] memory leak patches in libpq and psql A couple of small memory leak patches (detected with Purify) primarily in libpq. * Fixed (NULL) border problem in psql (run psql, do \m, then select something from a table...row separators will be nulls) * Fixed memory leak with the abovementioned border not being freed properly. * Fixed memory leak in freePGconn() not freeing conn->port * Fixed up PQclear() to free parts of PGresult only if these parts are not null. * Fixed a decent memory leak that occured after executing every command in psql. PGresult *results was not freed most of the time. There is still a leak being detected (2 bytes) in readline functions, but I think this is old readline library. I will install new one and test it.
1997-06-01Added \n to error message.Bruce Momjian
1997-06-01Escape newline in select output, from A. Duursma.Bruce Momjian
1997-05-20Added fcvt() prot for bsdi.Bruce Momjian
Made PQsetdb() and PQfnumber() case-insensitive. Removed attempt to set table ownership via pg_dumpall.
1997-05-13fix for sizeof pointed out by Ed BuddingtonBruce Momjian
1997-05-09From: Edmund Mergl <E.Mergl@bawue.de>Marc G. Fournier
Subject: [PATCHES] libpq patch Hi, here is a small patch which fixes two problems: 1. libpq/libpq-fe.h: somehow disappeared the line #define DefaultOption "" now compilation stops with an error complainig an unknown DefaultOption (970508). 2. Same patch as I sent already twice, but it never made it into the source tree: there is no default value for AuthType and Password. This way any libpq-application (i.e. perl-scripts) which use the function PQconnectdb will break with PostgreSQL-6.1. The patch simply uses an empty string as default value.
1997-05-07From: "Martin J. Laubach" <mjl@CSlab.tuwien.ac.at>Marc G. Fournier
Subject: [PATCHES] libpq SET var TO patch One last, I hope. This one corrects a bogus format string, and actually sends the contents of PG_DATESTYLE to the backend. That means, you can do a setenv PG_DATESTYLE 'iso', and your libpq will pick that up and tell the backend.
1997-05-06Change LOread() and LOwrite() to loread() and lowrite() to allow useThomas G. Lockhart
with case-insensitive SQL parser.
1997-04-29creation for postgresql-6.1Edmund Mergl
1997-04-17From: Raymond Toy <toy@rtp.ericsson.se>Marc G. Fournier
Subject: [PATCHES] 970417: some large object patches Two patches here, made against 970417. Both have to do with large objects: 1. lobjfuncs was not initialized in PQconnectdb. This causes failure later if large objects are used. (Someone already caught this error in PQsetdb.) 2. Postgres functions lo_import and lo_export sometimes produce garbage for the file names because the filename strings aren't always terminated by \0. (VARDATA isn't necessarily null terminated.)
1997-04-16connectDB(): setsockopt (..., TCP_NODELAY, ...) added.Vadim B. Mikheev
1997-04-15A couple of cleanups from Scott Harrison <Scott_Harrison@next.com>Marc G. Fournier
1997-04-04This commit represents a clean compile with the new templates underMarc G. Fournier
FreeBSD The Makefile(s) have all been cleaned up such that there is a single LDFLAGS vs LD_ADD or LDADD or LDFLAGS or LDFLAGS_BE. The Makefile(s) should be alot more straightforward then they were before...and consistent
1997-04-04Install os.h when we install the other headers...Marc G. Fournier
Pointed out by: System Administrator <sysadmin@sba.miami.edu>
1997-04-02From: "Martin J. Laubach" <mjl@CSlab.tuwien.ac.at>Marc G. Fournier
Subject: [HACKERS] libpq variable set patch Just a small change, so the automatic variable setting on connection startup actually works...
1997-04-02From: Anton de Wet <adw@obsidian.co.za>Marc G. Fournier
Subject: [HACKERS] Small patch to pgtclCmds.c Hi I have made the following small change to the extensions I made to pgtclCmds.c quite a while ago. At the moment there is a -assignbyidx option to pg_result assigning the returned tuples to an array by using the 1st field of the select statement as the key to the array. eg "select name,age from vitalstatistics" will result in an array with myarray(peter) = 32 myarray(paul) = 45 Often I need to have a pseudo-multi dimentional array eg. "select name,age from vitalstatistics where occupation='plummer' I would like to be able to generate an array newarray(peter,overpaid) = 32 So to add a arbitrary string to the key value I have extended pg_result $res -assignbyidx $arrayname to have an optional argument pg_result $res -assignbyidx $arrayname $appendstr So that that string is appended to the key value.
1997-04-02From: Oleg Bartunov <oleg@sai.msu.su>Marc G. Fournier
Subject: [HACKERS] locale patches ! Hi there, here are little patches to get Postgres 6.1 works with locale stuff. This is a patch against 970402.tar.gz, there are no problem to apply them by hand to 6.0 release. Collate stuff tested about 1-2 months in real working database but I'm sure there must be no problem. US hackers could vote against locale implementation ( locale for sure will affect to speed of postgres ), so I introduce variable USE_LOCALE which controls locale stuff. Non-US users now could use ~* operator for searching and <order by> for strings with nation alphabet. Please, don't forget, as I did first time, to set environment variable LC_CTYPE and LC_COLLATE because backend get locale information from them. I start postmaster from a little script, assuming that shell is Bash shell it looks like: #!/bin/sh export LC_CTYPE=koi8-r export LC_COLLATE=koi8-r postmaster -B 1024 -S -D/usr/local/pgsql/data/ -o '-Fe'
1997-03-25Various patches for shared libraries under i386-solaris by:Marc G. Fournier
Christoph Kaesling <ck@dog.pfalz.sub.de>
1997-03-25Here's two more diffs...Marc G. Fournier
The first fixes a warning from gcc about the assignment within the condition. The extra set of parens should not make a difference, but with -Werror, they are necessary. The second fixes an "ln -s" invocation that assumes the current directory is implicitly the target if not specified. Not true in all cases, and again, it should not make a difference except to those implementation that it does. From: "Michael P. Snyder" <msnyder@hawkeye.huntersmoon.com>
1997-03-25 - Renamed the variable names to something shorter, and I hopeMarc G. Fournier
nicer. Also, I grabbed my copy of the Informix manual, and added a couple of variables that make sense (formats for money, time, a language setting, a timezone). - New functions SetPGVariable() and GetPGVariable() in tcop/*. These don't actually do anything for the moment, but should be enough to implement the SET var_name TO var_val in the parser? SetPGVariable() expects just two strings, the var_name and the var_value from above, and is expected to do the right thing. Returns TRUE if everything okay. From: "Martin J. Laubach" <mjl@wwx.vip.at>
1997-03-18 - Move most of the I/O in both libpq and the backend to a setMarc G. Fournier
of common routines in pqcomprim.c (pq communication primitives). Not all adapted to it yet, but it's a start. - Rewritten some of those routines, to write/read bigger chunks of data, precomputing stuff in buffers instead of sending out byte by byte. - As a consequence, I need to know the endianness of the machine. Currently I rely on getting it from machine/endian.h, but this may not be available everywhere? (Who the hell thought it was a good idea to pass integers to the backend the other way around than the normal network byte order? *argl*) - Libpq looks in the environment for magic variables, and upon establishing a connection to the backend, sends it queries of the form "SET var_name TO 'var_value'". This needs a change in the backend parser (Mr. Parser, are you there? :) - Currently it looks for two Env-Vars, namely PG_DATEFORMAT and PG_FLOATFORMAT. What else makes sense? PG_TIMEFORMAT? PG_TIMEZONE? From: "Martin J. Laubach" <mjl@wwx.vip.at>
1997-03-17Fixes for libpgtcl from MassimoMarc G. Fournier
1997-03-16Don't forget the fe-connect.h include fileMarc G. Fournier
1997-03-16From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>Marc G. Fournier
Subject: [HACKERS] Patches for 970316 compilation I made a small pre-emptive change in the new datetime code to eliminate calls to infnan(). Hopefully this will make Solaris (and probably other non-GNUlib) systems happier. Didn't find fe-connect.h in the 970316 distribution, so made one up. Also, one of the test routines needs an update for the geo-decls.h -> geo_decls.h name change. Patches appear below...
1997-03-16om: "Martin J. Laubach" <mjl@CSlab.tuwien.ac.at>Marc G. Fournier
Subject: [HACKERS] Patch for io routines I am currently trying to improve on the front-backend communication routines; and noticed that lots of code are duplicated for libpq and the backend. This is a first patch that tries to share code between the two, more to follow. mjl
1997-03-15NetBSD Shared Library Patch from Martin J. LaubachMarc G. Fournier
1997-03-14Date/Time updates from Thomas...Marc G. Fournier
1997-03-12From: Dan McGuirk <mcguirk@indirect.com>Marc G. Fournier
Subject: [HACKERS] password authentication This patch adds support for plaintext password authentication. To use it, you add a line like host all 0.0.0.0 0.0.0.0 password pg_pwd.conf to your pg_hba.conf, where 'pg_pwd.conf' is the name of a file containing the usernames and password hashes in the format of the first two fields of a Unix /etc/passwd file. (Of course, you can use a specific database name or IP instead.) Then, to connect with a password through libpq, you use the PQconnectdb() function, specifying the "password=" tag in the connect string and also adding the tag "authtype=password". I also added a command-line switch '-u' to psql that tells it to prompt for a username and password and use password authentication.
1997-02-13Bring in Leo's <lsh@lubrizol.com> massive changes to libpq++Marc G. Fournier
1997-02-13Various patches for nextstep by GregorHoffleitMarc G. Fournier
Replaced NEED_STRDUP by !HAVE_STRDUP
1997-01-24Remove from include/config.h:Marc G. Fournier
#if defined(aix) #define TERMIOS_H_LOCATION <termios.h> #else #define TERMIOS_H_LOCATION <sys/termios.h> #endif libpq/fe-exec.c modified so that location of termios.h is determined by whether HAVE_TERMIOS_H is defined or not, in preparation for switch to configure
1997-01-23The last patch fixes some incongruences in the #define used to compile theMarc G. Fournier
Tcl arrays support. Here are the correct values to be defined in config.h and pgtclCmds.c. Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1997-01-23Fix from Andrew for compiling libpgtcl...basically, switch off -Werror,Marc G. Fournier
which probably isn't needed, since we are going to take off -Werror anyway, right?
1997-01-20Use gcc to make Linux ELF shared library, instead of ld.Bryan Henderson
1997-01-11Fixes:Marc G. Fournier
I forgot to clear out the variable created and the memory used. From: darcy@druid.net (D'Arcy J.M. Cain)
1997-01-11From: darcy@druid.net (D'Arcy J.M. Cain)Marc G. Fournier
Fix for libpgtcl: I forgot to clear out the variable created and the memory used.
1997-01-10cleanup for LINUX_ELFBruce Momjian
1997-01-10I found the following bugs in the version 6.0 (dated 961229).Bruce Momjian
At least the first two should be fixed before the final release of 6.0. 1) There is a mismatch between the type declared in the catalog for the input/output attributes of pg_type and the actual type of values stored in the table. The type of typinput, typoutput, typsend and typreceive are declared oid (26) while the values are regproc (24). The error was there also in previous versions but nobody noticed it until an Assert has been added in ExecEvalVar. The effect is that it is now impossible to replace the typoutput of existing data types with new procs. 2) The identd hba fails after the first time because the data read from the identd socket is not zero-terminated and strlen reports an incorrect length if the stack contains garbage, which usually happens after the first connection has been made. 3) The new initdb wants to create itself the data directory. This implies that the parent directory must be writable by postgres and this may not always be desirable. A better solution would be to allow the directory to be created by root and then filled by initdb. It would also nice to have some reasonable default for PGLIB and PGDATA like the previous version did. This applies also to the postmaster executable.
1997-01-10Additional fixes for shared library (BSD44_Derived port).Vadim B. Mikheev
1997-01-08From: wieck@sapserv.debis.deMarc G. Fournier
Hi, counting the empty dummy queries in libpq isn't everything. If the backend sends an error, the I returns from the dummies still come. So we must eat them up in any case, not just returning on the occurence of an E reply. Until later, Jan
1997-01-08minor path problem fix by tgl@mythos.jpl.nasa.govMarc G. Fournier
1997-01-06Fix mismatching prototype (const int vs int)Bryan Henderson
1997-01-06NeXT port specific changes by: Ovidiu Predescu <ovidiu@bx.logicnet.ro>Marc G. Fournier
1997-01-05Shared library fixes for BSD44_Derived portMarc G. Fournier
Submitted by: "Martin J. Laubach" <mjl@wwx.vip.at> NOTE: The following patch I was uncertain of, but applied it...will end up testing the compile on my machine later tonight anyway, but if anyone knows why this *shouldn't* have been done, please change it. (CC -> LD) *************** *** 61,68 **** ../backend/lib/dllist.o: $(MAKE) -C ../backend/lib dllist.o ! libpq.so.1: $(OBJS) ! $(CC) $(LDFLAGS) -shared $(OBJS) -o libpq.so.1 c.h: ../include/c.h rm -f c.h --- 66,73 ---- ../backend/lib/dllist.o: $(MAKE) -C ../backend/lib dllist.o ! $(shlib): $(OBJS) ! $(LD) $(LDFLAGS) -shared $(OBJS) -o $(shlib) c.h: ../include/c.h rm -f c.h
1997-01-03 someone added pg_listen and pg_notifies to libpgtcl. But firstMarc G. Fournier
these routines try to use the old pointer casting stuff to get the connection id, second the notification hash table should be part of the cliendData. Otherwise, one interpreter might eat up the notifies for another one. Please apply the patch below to the current 6.0 tree. Submitted by: wieck@sapserv.debis.de
1996-12-31Make error messages more explicit, PQtrace() output more readable.Bryan Henderson
1996-12-28Here's the final set of patches to 6.0 (sup'd on 27/12/96) that allow a fullBruce Momjian
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-28Patch for copy from stdin.Bruce Momjian