Commit Graph

330 Commits

Author SHA1 Message Date
Peter Eisentraut 424f0edcb8 Fix relative path references so that make knowns which dependencies refer
to one another. Sort out builddir vs srcdir variable namings. Remove some
now obsoleted make variables.
2000-08-31 16:12:35 +00:00
Bruce Momjian 7bc654bb16 SSL patch from Magnus 2000-08-30 14:54:24 +00:00
Peter Eisentraut 996832caee Make the location of the Kerberos server key file run time configurable
(rather than compile time). For libpq, even when Kerberos support is
compiled in, the default user name should still fall back to geteuid()
if it can't be determined via the Kerberos system.

A couple of fixes for string type configuration parameters, now that there
is one.
2000-08-25 10:00:35 +00:00
Peter Eisentraut 9b3d66ecbd Introduce HAVE_UNIX_SOCKETS symbol to replace repeatedly listing all the
unsupported platforms.
2000-08-20 10:55:35 +00:00
Peter Eisentraut 74618e2b82 Another round of those unportable config/build changes :-/
* Add option to build with OpenSSL out of the box. Fix thusly exposed
  bit rot. Although it compiles now, getting this to do something
  useful is left as an exercise.

* Fix Kerberos options to defer checking for required libraries until
  all the other libraries are checked for.

* Change default odbcinst.ini and krb5.srvtab path to PREFIX/etc.

* Install work around for Autoconf's install-sh relative path anomaly.
  Get rid of old INSTL_*_OPTS variables, now that we don't need them
  anymore.

* Use `gunzip -c' instead of g?zcat. Reportedly broke on AIX.

* Look for only one of readline.h or readline/readline.h, not both.

* Make check for PS_STRINGS cacheable. Don't test for the header files
  separately.

* Disable fcntl(F_SETLK) test on Linux.

* Substitute the standard GCC warnings set into CFLAGS in configure,
  don't add it on in Makefile.global.

* Sweep through contrib tree to teach makefiles standard semantics.

... and in completely unrelated news:

* Make postmaster.opts arbitrary options-aware. I still think we need to
  save the environment as well.
2000-07-09 13:14:19 +00:00
Peter Eisentraut 44f64dd3ea Makefile cleanup for interface tree. Now essentially with all the
standard targets and behaviour. Replaced Makefile.in's with
Makefile's and declared the respective variables in Makefile.global.

maintainer-clean target now available at top level, although it does
not work in the backend tree yet.

Cleanup pass over Makefile.shlib, renamed some targets and variables.
The shared library symlink tests are now done by make, not the shell.

ecpg: Remove one warning in sloppy flex output.

PL/Perl and Perl interface: the MakeMaker documentation is confusing,
the realclean target *does* "delete derived files", but it also
uninstalls them. Don't use that.

The submake targets in the various bin directories that update libpq
should `make all', not `make libpq.a'. That is a) unportable, and
b) doesn't build the shared library.
2000-06-28 18:30:16 +00:00
Peter Eisentraut 1652d43358 Remove fmgrstamp-h business -- not needed and confusing
Add options to configure to automatically build for Kerberos
support; no more editing of make files.
2000-06-17 00:10:40 +00:00
Peter Eisentraut 44d1abebb4 Big warnings cleanup for Solaris/GCC. Down to about 40 now, but
we'll get there one day.

Use `cat' to create aclocal.m4, not `aclocal'. Some people don't
have automake installed.

Only run the autoconf rule in the top-level GNUmakefile if the
invoker specified `make configure', don't run it automatically
because of CVS timestamp skew.
2000-06-14 18:18:01 +00:00
Bruce Momjian 6cb6d05456 Brand 7.1 release. Also update jdbc version in release branch. 2000-06-12 22:36:19 +00:00
Peter Eisentraut 06cd0f1a32 Substituted new configure test for types of accept()
Interfaced a lot of the custom tests to the config.cache, in the process
made them separate macros and grouped them out into files. Made naming
adjustments.

Removed a couple of useless/unused configure tests.

Disabled C++ by default. C++ is no more special than Perl, Python, and Tcl.
And it breaks equally often. :(
2000-06-11 11:40:09 +00:00
Peter Eisentraut 5b9d0d9a5c Moved configure script from src/ to the top level directory. Moved
configuration helper things into config/ dir. Adjusted some relative paths
in makefiles.
2000-06-06 22:01:15 +00:00
Bruce Momjian cc2b5e5815 Remove NT-specific file open defines by defining our own open macros for
"rb" and "wb".
2000-06-02 15:57:44 +00:00
Peter Eisentraut 6a68f42648 The heralded `Grand Unified Configuration scheme' (GUC)
That means you can now set your options in either or all of $PGDATA/configuration,
some postmaster option (--enable-fsync=off), or set a SET command. The list of
options is in backend/utils/misc/guc.c, documentation will be written post haste.

pg_options is gone, so is that pq_geqo config file. Also removed were backend -K,
-Q, and -T options (no longer applicable, although -d0 does the same as -Q).

Added to configure an --enable-syslog option.

changed all callers from TPRINTF to elog(DEBUG)
2000-05-31 00:28:42 +00:00
Bruce Momjian 6c944bf3cc Cleanup of <> and "" 2000-05-29 21:25:07 +00:00
Tom Lane 0a7fb4e918 First round of changes for new fmgr interface. fmgr itself and the
key call sites are changed, but most called functions are still oldstyle.
An exception is that the PL managers are updated (so, for example, NULL
handling now behaves as expected in plperl and plpgsql functions).
NOTE initdb is forced due to added column in pg_proc.
2000-05-28 17:56:29 +00:00
Bruce Momjian d45f7dfdca Update kerberos patch 2000-05-27 04:13:05 +00:00
Bruce Momjian 632a7ed759 Back out kerberos changes. Causes compile problems. 2000-05-27 03:58:20 +00:00
Bruce Momjian 9500b35f17 Patch for Kerberos V.
Most (nearly all) of the work was done by David Wragg <dpw@doc.ic.ac.uk>

He patched 6.5.3. I've updated it for 7.0RC5.

It works for MIT kerberos 1.1.1 (and previously for 1.0.6 as well).

I've got the patch against 6.5.3, plus kerberized RPMS.

Mike Wyer <mw@doc.ic.ac.uk>     ||         "Woof?"
2000-05-27 03:39:33 +00:00
Bruce Momjian 61f5e13c43 ! * Users doing non-blocking connections need to handle the reset
!        * themselves, they'll need to check the connection status if we
!        * return an error.

Alfred Perlstein
2000-05-25 19:09:55 +00:00
Tom Lane 1f0aff03c0 Remove calls to getprotobyname(), which we now know leaks memory on
some platforms --- and I also see that it is documented as not thread-
safe on HPUX and possibly other platforms.  No good reason not to just
use IPPROTO_TCP constant from <netinet/in.h> instead.
2000-05-21 21:19:53 +00:00
Tom Lane bf00aec8d0 If configure finds that inet_aton() is not present on this platform,
include the version from backend/port into libpq.
There is a second-rate implementation of inet_aton() already present
in fe-connect.c, #ifdef'd WIN32.  That ought to be removed in favor
of using the better version from port/.  However, since I'm not in a
position to test the WIN32 code, I will leave well enough alone for
this release...
2000-04-14 00:42:06 +00:00
Tom Lane 977fad3f17 Revert inclusion of postgres_ext.h to use "..." instead of <...>, per
request from XEmacs people.
2000-04-14 00:24:52 +00:00
Bruce Momjian 52f77df613 Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
Bruce Momjian b68a56a5e9 Thomas pointed out this bug in my non-blocking stuff.
Alfred Perlstein
2000-04-11 19:00:31 +00:00
Tom Lane 835d78d589 Remove extraneous semicolon. 2000-03-30 02:59:14 +00:00
Tom Lane 0edcee3459 Fold PQsetenv working state into PGconn, rather than trying to maintain
it in a separate object.  There's no value in keeping the state separate,
and it creates dangling-pointer problems.  Also, remove PQsetenv routines
from public API, until and unless they are redesigned to have a safer
interface.  Since they were never part of the documented API before 7.0,
it's unlikely that anyone is calling them.
2000-03-24 01:39:55 +00:00
Bruce Momjian b2d867fb08 Some points for portability improvements:
1. C++ style comments in C source for ecpg ( // comment )
2. compiler finds wrong include file extern.h in ecpg/lib/descriptor.c
from
include path instead of workdir (rename it ?)
3. fe-connect getsockopt takes a socklen_t as fifth arg not int (use
SOCKET_SIZE_TYPE instead)
4. char vs unsigned char in psql calls to libpq
5. empty define that results in an empty but terminated line ( ; )

Now for all but point 3 I can supply changes to the
compiler flags, to make the compiler less pedantic.
Or is someone interested in the complications ?

in the meantime can someone apply the attached patch ?

Andreas
2000-03-23 17:27:36 +00:00
Bruce Momjian 2f839c58e2 Please apply the attached patch to interfaces/libpq/libpq-fe.h. This would
allow to write applications which do not have a link to postgres_ext.h in
their source directory.

Andreas Kardos
2000-03-23 15:00:11 +00:00
Tom Lane a50f2fd76e Repair unintentional damage to MULTIBYTE code. 2000-03-14 23:59:23 +00:00
Tom Lane a71daab4b4 Change PQconndefaults() to return a malloc'd array, instead of a static
array.  This allows processing of conninfo strings to be made thread-safe,
at the cost of a small memory leak in applications that use
PQconndefaults() and are not updated to free the returned array via
the new PQconninfoFree() function.  But PQconndefaults() is probably not
used very much, so this seems like a good compromise.
2000-03-11 03:08:37 +00:00
Bruce Momjian ce9f73c162 The following is required in order to make beta1 compile on the Win32
platform (psql and libpq):

The file "config.h.win32" in the include\ directory (from my patch from
2000-01-18) is missing from the tree. It needs to be put back :-)

The following patch has to be applied in the interfaces\libpq directory.


//Magnus
2000-02-24 15:53:12 +00:00
Tom Lane 58f481c4ff Tweak libpq so that if a backend ERROR message arrives while libpq
thinks the connection is idle, the error message is displayed as if
it were a NOTICE.  This seems better than dropping the message on
the floor ... particularly if the message is the backend telling us
why it's about to close the connection.  The previous behavior was
Backend message type 0x45 arrived while idle
pqReadData() -- backend closed the channel unexpectedly.
which is not real helpful.
2000-02-24 04:50:51 +00:00
Jan Wieck da9501bddb Avoid race conditions in detection of EINPROGRESS during connect().
Jan
2000-02-21 12:26:19 +00:00
Tatsuo Ishii 4fec86f1f6 Fix nasty bug in setting client_encoding 2000-02-19 05:04:54 +00:00
Tom Lane b1577a7c78 New cost model for planning, incorporating a penalty for random page
accesses versus sequential accesses, a (very crude) estimate of the
effects of caching on random page accesses, and cost to evaluate WHERE-
clause expressions.  Export critical parameters for this model as SET
variables.  Also, create SET variables for the planner's enable flags
(enable_seqscan, enable_indexscan, etc) so that these can be controlled
more conveniently than via PGOPTIONS.

Planner now estimates both startup cost (cost before retrieving
first tuple) and total cost of each path, so it can optimize queries
with LIMIT on a reasonable basis by interpolating between these costs.
Same facility is a win for EXISTS(...) subqueries and some other cases.

Redesign pathkey representation to achieve a major speedup in planning
(I saw as much as 5X on a 10-way join); also minor changes in planner
to reduce memory consumption by recycling discarded Path nodes and
not constructing unnecessary lists.

Minor cleanups to display more-plausible costs in some cases in
EXPLAIN output.

Initdb forced by change in interface to index cost estimation
functions.
2000-02-15 20:49:31 +00:00
Peter Eisentraut 9ceb5d8a7b Fixed psql double quoting of SQL ids
Fixed libpq printing functions
2000-02-07 23:10:11 +00:00
Tatsuo Ishii d4e62e5ded Change function name PQclientencoding to PQclientEncoding since
it seems more suitable for the naming convention in libpq.

New function PQsetClientEncoding added. It makes possible to change
the client encoding on the fly without setting PGCLIENTENCODING.
2000-02-05 12:33:22 +00:00
Peter Eisentraut 2b84cbb60f A few minor psql enhancements
Initdb help correction
Changed end/abort to commit/rollback and changed related notices
Commented out way old printing functions in libpq
Fixed a typo in alter table / alter column
2000-01-29 16:58:54 +00:00
Bruce Momjian 5c25d60244 Add:
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc

to all files copyright Regents of Berkeley.  Man, that's a lot of files.
2000-01-26 05:58:53 +00:00
Bruce Momjian da5aba105f Remove Ops parameter from STATRELID cache lookup, for Tom Lane and
optimizer.
2000-01-24 02:12:58 +00:00
Peter Eisentraut 49581f9848 updated install file
updated date/time types doc
fixed small psql bug
removed libpq code that lower-cased db names
make notice when long identifier is truncated
2000-01-23 01:27:39 +00:00
Tom Lane d242b64ba2 Tweak includes to avoid compiler warning on HPUX. 2000-01-20 04:11:52 +00:00
Peter Eisentraut 533d516629 Removed MBFLAGS from makefiles since it's now done in include/config.h. 2000-01-19 02:59:03 +00:00
Tatsuo Ishii 8ff9f85bd5 Fix for multibyte support. Since some function declarations
moved to miscadmin.h, we have to include it now.
2000-01-19 01:33:16 +00:00
Bruce Momjian 0cb6bc70ce Hi!
Here is a patch to bring both libpq and psql to a state where it compiles on
win32 (native) again. A lot of things have changed, and I have not been able
to keep up with them all, so it has been broken for quite a while.
After this patch, at least it compiles. It also talks "basic talk" to the
server, but I have not yet tested all things. Sending queries, and using
e.g. \d or \dt works fine. The rest will have to be tested further.
It also bumps the version on libpq.dll to 7.0.

Everything should be enclosed in #ifdef WIN32, unless I have missed
something. Except for one or maybe two places where I have moved a #include
that should not be used on win32 from the "global area" into a "#ifndef
WIN32 area".


//Magnus
2000-01-18 19:05:31 +00:00
Bruce Momjian 10d7287ab9 Libpq non-blocking mode, from Alfred Perlstein 2000-01-18 06:09:24 +00:00
Tom Lane 2fd4e7762c Modify libpq's pqexpbuffer to eliminate length restriction on how much
data can be formatted per call.  This requires relying on vsnprintf().
On machines that haven't got vsnprintf, link in the version from
backend/port/.
2000-01-17 02:59:46 +00:00
Tom Lane d00391e7ac Sigh, I'm an idiot ... I broke the async startup logic a couple days ago,
by creating a race condition.  It wasn't waiting for select() to say
write-ready immediately after connect, which meant that you might get
an unhelpful 'broken pipe' error message if connect failed, rather than
the intended error message.
2000-01-16 21:18:52 +00:00
Tatsuo Ishii 8fc386a2d8 Eliminate using putenv(). 2000-01-15 05:37:21 +00:00
Tom Lane 2af360ed1c Clean up some problems in new asynchronous-connection logic
in libpq --- mostly, poor response to error conditions.  You now actually
get to see the postmaster's 'The Data Base System is starting up' message,
which you didn't before.  I suspect the SSL code is still broken though.
2000-01-14 05:33:15 +00:00