Commit Graph

850 Commits

Author SHA1 Message Date
Marc G. Fournier 4aa1734f36 Added in PQconnectdb() function
Submitted by: wieck@sapserv.debis.de (Jan Wieck)
1996-11-09 10:39:54 +00:00
Bruce Momjian a0990e1884 Makefile cleanup after reorganization 1996-11-09 06:24:51 +00:00
Bruce Momjian 78078236ea Fix typo in file name found during install. 1996-11-08 21:40:11 +00:00
Bruce Momjian 4b2b8592a0 Compile and warning cleanup 1996-11-08 06:02:30 +00:00
Marc G. Fournier 2768f391a4 There is a problem in the Makefile of libpgtcl on linux (and maybe also on
other platforms).  If I do the standard make + make install the shared library
is not linked with the the libpq library and when I try to load it in the
standard Tcl or Tk shell I get a lot of unresolved symbols.  The bug doesn't
affect pgtclsh because it is linked also with libpq. The problem exists only
when using the dynamic load feature of Tcl7.5.


From: Massimo Dal Zotto <dz@cs.unitn.it>
1996-11-08 00:58:07 +00:00
Bryan Henderson 089dfb61f0 Add ability to deal with the fmgr.h dependency. 1996-11-04 06:32:59 +00:00
Bruce Momjian 5061c23ac2 Rename CDEBUG to COPT 1996-11-04 05:15:07 +00:00
Bruce Momjian 7e42f4814d Removed PORTNAME_. Use OS version only. 1996-11-04 04:00:56 +00:00
Marc G. Fournier 4bdf308bdf shared build fails, but the rest compiles...formatting error in the
cc -shared, I believe...
1996-11-03 07:14:32 +00:00
Bryan Henderson b216c1eac6 Continuation of make file simplification; deal with header file shuffle. 1996-11-02 09:54:44 +00:00
Bruce Momjian d91cc297bb Changed include path. 1996-10-31 05:58:32 +00:00
Marc G. Fournier 552620c8b2 Changes to libpgtcl submitted by: wieck@sapserv.debis.de (Jan Wieck)
Adds:

    -lAttributes

        Returns another format of the results attribute list. Per
        attribute a sublist  of  {{attname}  atttype  attlen}  is
        returned  and  an  empty  string  if  no attributes where
        received.

    -numAttrs

        Returns the number of attributes in the result.
1996-10-30 06:18:42 +00:00
Bryan Henderson aa71f918c3 Fix sigaction again to try for portability. 1996-10-29 21:53:48 +00:00
Bryan Henderson e18d49d82a Add CFLAGS+=-DPOSTPORT=... so we can take it out of the global CFLAGS. 1996-10-25 09:22:30 +00:00
Bryan Henderson 6cbaa93b82 Change treatment of sigaction structure again to include even more platforms.
Thanks D'Arcy.
1996-10-16 09:41:13 +00:00
Bryan Henderson ec610a7696 Remove 4th element of sigaction structure so it works on more platforms. 1996-10-15 07:16:41 +00:00
Bruce Momjian 86be8677a9 Added consistent include file handling for MAXHOSTNAMELEN.
If I have introduced any syntax errors with this, I will patch them in
the morning, and Marc will have a good laugh.
1996-10-13 04:50:27 +00:00
Bryan Henderson 329b38eebb Add PGUSER environment variable for client to specify Postgres username. 1996-10-10 08:20:11 +00:00
Marc G. Fournier 4e8f5c337c Well I haven't received any feedback pro or con re my suggested new Tcl
function so I am going to assume that it is such a good idea that no
one sees any point in discussing it.  :-)  I have made two changes -
I have merged this into pgtclCmds.c and I have taken out any code for
updating tuples after the loop body runs.  See comments for discussion
of this.

I have also fixed up the error checking stuff so that break, continue
and syntax errors have the expected result.

Submitted by: D'Arcy Cain
1996-10-07 21:19:09 +00:00
Bruce Momjian fd067981be Fix location of include files to match postgres.h includes. 1996-09-25 19:37:31 +00:00
Marc G. Fournier afcbce5c22 CFLAGS +- -I... got messed by one of Bryan's patches
Fix Submitted by: Bryan himself :)
1996-09-23 18:14:08 +00:00
Marc G. Fournier ff4d0d435e Here's a patch that I discussed recently on pg95-dev that changes the
way one creates a database system.  Parts that were in "make install"
are not either in "make all" or initdb.  Nothing goes in the PGDATA
directory besides user data.  Creating multiple database systems is
easier.

In addition to applying the patch, it is necessary to move the file
libpq/pg_hba to backend/libpq/pg_hba.sample.

Submitted by: Bryan Henderson <bryanh@giraffe.netgate.net>
1996-09-23 08:24:13 +00:00
Marc G. Fournier 24f0012268 I have made some corrections to my previous patches for retrieving array
attributes as tcl arrays.  The previous code had problems with some chars
used as delimiter by Tcl.  The new code should be more robust.

By: Massimo Dal Zotto <dz@cs.unitn.it>
1996-09-16 05:54:53 +00:00
Marc G. Fournier bbebcb125e Fixes:
Async notifies received while a backend is in the middle of a begin/end
transaction block are lost by libpq when the final end command is issued.

The bug is in the routine PQexec of libpq. The routine throws away any
message from the backend when a message of type 'C' is received. This
type of message is sent when the result of a portal query command with
no tuples is returned. Unfortunately this is the case of the end command.
As all async notification are sent only when the transaction is finished,
if they are received in the middle of a transaction they are lost in the
libpq library. I added some tracing code to PQexec and this is the output:

Submitted by: Massimo Dal Zotto <dz@cs.unitn.it>
1996-09-16 05:50:46 +00:00
Marc G. Fournier 28fad34c7b modifications required to reflect centralized include files 1996-08-28 23:02:43 +00:00
Marc G. Fournier e2c9fd8e87 |May I suggest to add access to the oid of an inserted
|record, by a small patch to libpq++? At least until the
|feature that will allow dumped oid's to be re-loaded into
|a database becomes available, I need access to the oids
|of newly created records... To this end, I have written a
|three-line wrapper for the PQoidStatus function in libpq and
|named this wrapper OidStatus() (I'd appreciate suggestions for
|a name that would better fit into the general naming scheme).
|
|Regards,
|
|Ernst
|
1996-08-21 04:32:09 +00:00
Marc G. Fournier 0e9f4ceae0 Here's a minor fix that fixes a casting problem:
-Kurt
1996-08-19 13:38:42 +00:00
Marc G. Fournier 77e01653bc Fixes:
When you connect to a database with PQsetdb, as with psql, depending on
how your uninitialized variables are set, you can get a failure with a
"There is no connection to the backend" message.

The fix is to move a call to PQexec() from inside connectDB() to
PQsetdb() after connectDB() returns to PQsetdb().  That way a connection
doesn't have to be already established in order to establish it!


From:  bryanh@giraffe.netgate.net (Bryan Henderson)
1996-08-19 13:25:40 +00:00
Marc G. Fournier bde34552a2 |
|Here is a fix for the psql alignment problem.  It turns out that libpq
|was trying to determine if the column contained only numeric values so
|it could right justify it.  The 'e' values were taked as exponient
|values and all columns were considered numeric.
|
|The patch excludes 'e' and 'E' as being valid first-column numeric
|values.
|

Submitted by: Bruce...
1996-08-14 16:44:51 +00:00
Marc G. Fournier 011ee13131 |
|We're all too familiar with psql's "no response from backend" message.
|Users can't tell what this means, and psql continues prompting for
|commands after it even though the backend is dead and no commands can
|succeed.  It eventually dies on a signal when the dead socket fills
|up.  I extended the message to offer a better explanation and made
|psql exit when it finds the backend is dead.
|
|I also added a short message and newline when the user does a ctl-D so
|it doesn't mess up the terminal display.
|
|

Submitted by: Bryan Henderson <bryanh@giraffe.netgate.net>
1996-08-14 04:56:55 +00:00
Marc G. Fournier 9305fc748c Fixes:
Attached is a patch to allow libpq to determine if a field is null.

This is needed because text fields will return a PQgetlength() of 0
whether it is '' or NULL.  There is even a comment in the source noting
the fact.

I have changed the value of the 'len' field for NULL result fields.  If
the field is null, the len is set to -1 (NULL_LEN).  I have changed
PQgetlength() to return a 0 length for both '' and NULL.  A new function
PQgetisnull() returns true or false for NULL.

The only risk is to applications that do not use the suggested
PQgetlength() call, but read the result 'len' field directly.

As this is not recommended, I think we are safe here.

A separate documentation patch will be sent.


Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
1996-08-13 01:34:29 +00:00
Marc G. Fournier 4db7f15b2a Updates to libpq to fix breakage in previous patch...
Submitted by: darcy@druid.druid.com (D'Arcy J.M. Cain)
1996-08-10 00:22:48 +00:00
Marc G. Fournier c4e53a1411 Fixes for:
Here are a few minor fixes to Postgres95.  Mostly I have added const
to some of the char pointers.  There was also a missing header file
and a place where it looks like "==" was used when "=" was meant.
I also changed some variables from Pfin and Pfout tp pfin and pfout
because the latter shadow global variables and that just seems like
an unsafe practice which I like to avoid.

Submitted by:  "D'Arcy J.M. Cain" <darcy@druid.druid.com>
1996-08-06 16:16:50 +00:00
Marc G. Fournier 4d837e370c Change the TEMPDIR to be obj instead of /tmp
Suggested by: Michael Babcock <michael@kanji.com>
1996-08-01 05:04:29 +00:00
Marc G. Fournier 4e82924eac Row count patch from Bruce 1996-07-31 18:40:12 +00:00
Marc G. Fournier dbf2a8c984 Everyone seems to suggestion this is something that should be there...
#include <sys/termios.h>

Submitted by: Dr. George
1996-07-31 06:05:46 +00:00
Marc G. Fournier 3881cbd2f6 Added <sys/termios.h> for i386_solaris port
Submitted by: Dr_George_D_Detlefsen <drgeorge@ilt.com>
1996-07-31 02:20:59 +00:00
Marc G. Fournier e0d48c317c Fixes: Floating point exception in psql
Submitted by: Dan McGuirk <mcguirk@indirect.com>
1996-07-31 02:06:00 +00:00
Marc G. Fournier c4ea55d2c9 clean up /tmp behind itself
submitted by: bruce
1996-07-29 20:52:24 +00:00
Marc G. Fournier b834d27bc9 small port fixes for sparc_solaris
submitted by: jason
1996-07-28 06:54:15 +00:00
Marc G. Fournier edb519b14c and now, the long awaited PAGER patches from Bruce...
Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
1996-07-27 02:55:23 +00:00
Marc G. Fournier c13ef1afed My patch to fe-connect.c introduced a new bug which is triggered only, if
Kerberos is being used (attempt to free static memory).
The error was caused by a confusing doublespeak of fe_getauthname():
Returns a pointer to static memory, if you authenticate via Kerberos,
a pointer to dynamic memory otherwise.

Submitted by: Erich Stamberger <eberger@gewi.kfunigraz.ac.at>
1996-07-27 02:27:55 +00:00
Julian Assange 23c7ff0b3c PQprint() routines. The older code is still there for historical
compatibility. There isn't much difference here against my previous
PQprint() code, except that you can add optional arguments to the
<table args> in html.
1996-07-25 06:21:11 +00:00
Marc G. Fournier 83c9ec765e Last changes to src from Dr. George *wipes brow* 1996-07-23 03:38:44 +00:00
Marc G. Fournier 2206b5819d Alot of "changes" from Dr. George's source tree...
Most of the changes in here look to b epurely cosmetic, and don't
affect anything...

...and some stuff is completely questionable...in that I may have reversed
some of the stuf fwe already had :(
1996-07-23 03:35:14 +00:00
Marc G. Fournier 3704b99522 - libpq calls "fe_getauthname()" two times in "fe-connect.c", but
doesn't free the buffer allocated by this function.

- submitted by: Erich Stamberger <eberger@gewi.kfunigraz.ac.at>
1996-07-19 07:00:56 +00:00
Marc G. Fournier de82ece8bd Fix PAGER bug in createuser/etc scripts
submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-19 06:36:38 +00:00
Marc G. Fournier 72f76d38eb libpq and psql.c have been modified to do various things they didn't do
before (plus some optimisations/bug fixes et al).  I've included a small
demo transcript below. Note that all of of the display
functionality/intelligence you see here, can be had merely by calling
the new LIBPQ PQprint() routine with the appropriate arguments/options,
including the HTML3 output guff.


submitted by:  Julian Assange <proff@suburbia.net>
1996-07-18 05:48:57 +00:00
Marc G. Fournier e72ca17f77 fixes for several potential null pointer dereferences
submitted by: Paul "Shag" Walmsley <ccshag@cclabs.missouri.edu>
1996-07-12 04:53:59 +00:00
Marc G. Fournier d31084e9d1 Postgres95 1.01 Distribution - Virgin Sources 1996-07-09 06:22:35 +00:00