Commit Graph

1876 Commits

Author SHA1 Message Date
Barry Lind 62da2fa0e1 Fixed DatabaseMetaData to correctly handle NAME size of 64
Fixed Statement to correctly DEALLOCATE any prepared statements

 Modified Files:
 	jdbc/org/postgresql/PGStatement.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
2002-09-08 00:15:29 +00:00
Bruce Momjian f37c1c486a Run pgjindent for Java folks. 2002-09-06 21:23:06 +00:00
Bruce Momjian 847f8b39d7 Fix printf() quote handling and improper exit(), per Tom. 2002-09-06 02:33:47 +00:00
Bruce Momjian e06f4c65b4 Fix compile error. 2002-09-05 22:24:23 +00:00
Bruce Momjian 5fc10c3d17 Remove PGPASSWORDFILE and default to always trying $HOME/.pgpass.
Cleanup up memory allocation for $HOME in related psql places.

Update mention of $HOME/.pgpass in the docs;  add mention in pg_dumpall.
2002-09-05 22:05:50 +00:00
Peter Eisentraut a11ea5e2a3 Don't use gethostbyname2(). It's not portable and we don't claim to
support IPv6 anyway.
2002-09-05 18:27:13 +00:00
Bruce Momjian e50f52a074 pgindent run. 2002-09-04 20:31:48 +00:00
Bruce Momjian 79ecb80c74 Brand 7.3. Ready for beta! 2002-09-04 07:23:04 +00:00
Peter Eisentraut 77f7763b55 Remove all traces of multibyte and locale options. Clean up comments
referring to "multibyte" where it really means character encoding.
2002-09-03 21:45:44 +00:00
Tom Lane 00482fde8e Partial solution for 'unexpected EOF' problem with pg_disconnect: it
seems we have a choice between annoying messages and leaking memory
(or dumping core, but that's right out).  Patch also fixes several
other problems in pg_disconnect, such as being willing to close a
channel that isn't a PG channel.
2002-09-02 23:41:17 +00:00
Peter Eisentraut b28b05317d Translation updates 2002-09-02 22:22:12 +00:00
Tom Lane 8c8aa53953 pg_on_connection_loss command for libpgtcl. Patch from
Gerhard Hintermayer, revised and documented by Tom Lane.

This patch also fixes a 'must fix' bug: libpgtcl's LISTEN/NOTIFY
support was broken by the recent changes to the PGnotify structure.
Guess that change wasn't quite so safe as we thought.
2002-09-02 21:51:47 +00:00
Tom Lane 460ee04956 Fix breakage introduced by evidently-completely-untested snprintf patch. 2002-09-02 14:43:14 +00:00
Bruce Momjian a12b4e279b I checked all the previous string handling errors and most of them were
already fixed by You. However there were a few left and attached patch
should fix the rest of them.

I used StringInfo only in 2 places and both of them are inside debug
ifdefs. Only performance penalty will come from using strlen() like all
the other code does.

I also modified some of the already patched parts by changing
snprintf(buf, 2 * BUFSIZE, ... style lines to
snprintf(buf, sizeof(buf), ... where buf is an array.

Jukka Holappa
2002-09-02 06:11:43 +00:00
Barry Lind 2232172e44 JDBC checkin fixing the following bugs:
Fixed support in the driver for notifications (added PGConnection.getNotifications()) - problem reported by Benjamin.Feinstein@guardent.com
  Worked around server problems with int8/int2 and constants; quote values when they are intended to bind to an int8/int2 column - reported by many
  Fixed bug in the Array interface with string parsing not handling escaped characters correctly - reported by devajx@yahoo.com
  Added workaround to support 'infinity' and '-infinity' for dates - reported bydmitry@openratings.com
  Fixed some performance issues with setBlob - reported by d.wall@computer.org
  Added support for using new prepared statements functionality in 7.3 (added PGStatement.setUseServerPrepare() and isUseServerPrepare() methods)

 Modified Files:
 	jdbc/org/postgresql/PGConnection.java
 	jdbc/org/postgresql/PGStatement.java
 	jdbc/org/postgresql/core/QueryExecutor.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java
 	jdbc/org/postgresql/jdbc2/Array.java
 Added Files:
 	jdbc/org/postgresql/PGNotification.java
 	jdbc/org/postgresql/core/Notification.java
2002-09-02 03:07:36 +00:00
Dave Cramer fcd34f9f7f patch from Thomas O'Dowd to ensure that connections are closed 2002-09-01 23:56:13 +00:00
Dave Cramer 422c2e38a1 testing for insertRow 2002-09-01 23:45:20 +00:00
Dave Cramer 881390fff6 patch to allow insertRow on an empty resultSet 2002-09-01 23:40:36 +00:00
Dave Cramer 6a5168a7a1 Changed to reflect the current reality, ie we do support updateable resultsets 2002-09-01 23:38:53 +00:00
Marc G. Fournier 9a0b4d7f84 perl5 interface moved to gborg 2002-08-30 13:06:22 +00:00
Marc G. Fournier c411f51dfb libpgeasy moved to gborg ... 2002-08-30 13:03:11 +00:00
Tom Lane df40e28850 Fix off-by-one allocation error in PasswordFromFile(), per Gordon Runkle. 2002-08-30 05:28:50 +00:00
Bruce Momjian 40f2eec503 > > > > If you want to put in security restrictions that are actually useful,
> > > > where is the code to verify that PGPASSWORDFILE points at a
> > > > non-world-readable file?  That needs to be there now, not later, or
> > > > we'll have people moaning about backward compatibility when we finally
> > > > do plug that hole.

Alvaro Herrera
2002-08-29 23:06:32 +00:00
Tatsuo Ishii ed7baeaf4d Remove #ifdef MULTIBYTE per hackers list discussion. 2002-08-29 07:22:30 +00:00
Tom Lane 5241a6259f Remove support for version-0 FE/BE protocol, per pghackers discussion.
This breaks support for 6.2 or older client libraries.
2002-08-29 03:22:01 +00:00
Peter Eisentraut 3aaffad26f Updates from Dennis Bjorklund 2002-08-28 20:58:45 +00:00
Bruce Momjian 81dfa2ce43 backend where a statically sized buffer is written to. Most of these
should be pretty safe in practice, but it's probably better to be safe
than sorry.

I was actually looking for cases where NAMEDATALEN is assumed to be
32, but only found one. That's fixed too, as well as a few bits of
code cleanup.

Neil Conway
2002-08-28 20:46:24 +00:00
Bruce Momjian f5fea0808f This is a quick patch to fix a crash in pgquery_dictresult() introduced
recently. I just ran into it while running a set of python test scripts,
and I'm not sure who the normal maintainer is for interfaces/python.

John Nield
2002-08-28 20:18:58 +00:00
Bruce Momjian a1c218cae4 The attached patch implements the password packet length sanity check
(using an elog(LOG) ), as well as includes a few more comment fixes.

Neil Conway
2002-08-27 16:21:51 +00:00
Bruce Momjian 840deabfe0 More connection timeout cleanups. 2002-08-27 15:02:50 +00:00
Bruce Momjian 4e723e6717 Cleanup of libpq connection timeout code. 2002-08-27 14:49:52 +00:00
Bruce Momjian bda45958a8 This is a 2 line patch to src/interfaces/perl5/GNUMakefile that fixes
the 'override CPPFLAGS' to include the source directory during compile,
and makes the install target look in the proper place for the man page.

Changes are only required when building outside the source directory.

J. R. Nield
2002-08-27 03:57:11 +00:00
Tom Lane 976246cc7e The cstring datatype can now be copied, passed around, etc. The typlen
value '-2' is used to indicate a variable-width type whose width is
computed as strlen(datum)+1.  Everything that looks at typlen is updated
except for array support, which Joe Conway is working on; at the moment
it wouldn't work to try to create an array of cstring.
2002-08-24 15:00:47 +00:00
Barry Lind fe2dec75a9 Enhancements to how queries with bind values are stored internally and sent to
the server.  Previously we allocated a new String object for the entire final
query we were sending to the database.  If you had a big query, or especially
if you had large bind values you ended up with essentially two copies in memory.
This change will reuse the existing objects and therefore should take 1/2 the
memory it does today for a given query.  This restructuring will also allow
in the future the ability to stream bytea data to the server instead of the current approach of pulling it all into memory.
I also fixed a test that was failing on a 7.2 database.
Also renamed some internal variables and some minor cleanup.

 Modified Files:
 	jdbc/org/postgresql/core/QueryExecutor.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java
 	jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java
2002-08-23 20:45:49 +00:00
Marc G. Fournier 5a303f878e Remove all traces of the ODBC driver, which is now on GBorg as the psqlodbc
project ...
2002-08-22 22:43:14 +00:00
Marc G. Fournier da4683fbe1 Okay, libpq++ is moved to GBorg, and all traces of it have been removed
from the core repository ... I haven't *moved* the libpq++ files out of the
tree, mainly as we want to keep them in place for past branches ...

Peter, I think I've covered all the files I need, and re-ran autoconf to make
sure the configure file is in place properly ...
2002-08-22 00:15:14 +00:00
Peter Eisentraut 41c92ace2f Move PO files into subdirectories separate from the source code. 2002-08-21 20:42:27 +00:00
Barry Lind f736fdb022 Removed code that is no longer used and has been commented out
for the last two releases.

 Modified Files:
 	jdbc/org/postgresql/Driver.java.in
 	jdbc/org/postgresql/PG_Stream.java
 Removed Files:
 	jdbc/org/postgresql/core/BytePoolDim1.java
 	jdbc/org/postgresql/core/BytePoolDim2.java
 	jdbc/org/postgresql/core/MemoryPool.java
 	jdbc/org/postgresql/core/ObjectPool.java
 	jdbc/org/postgresql/core/SimpleObjectPool.java
2002-08-20 04:26:02 +00:00
Tom Lane 41298cf8a6 Add #include <sys/time.h>. 2002-08-18 03:47:08 +00:00
Bruce Momjian 3dd8369f77 Back out tcl patch, per Tom Lane:
Everytime if I do PQconsumeInput (when the backend channel gets
readable) I check for the return value. (0 == error) and generate a
notification manually, e.g. fixed string connection_closed) and pass it to the
2002-08-18 01:39:43 +00:00
Bruce Momjian 5bf6af6cf4 Add includes for prototype using timeval. 2002-08-18 01:35:40 +00:00
Bruce Momjian 1c69f13447 Clean up compile warnings. 2002-08-18 00:06:01 +00:00
Bruce Momjian f0ed4311b6 Add libpq connection timeout parameter.
Denis A Ustimenko
2002-08-17 12:33:18 +00:00
Bruce Momjian b7214a877c What I have done for libpgtcl:
Everytime if I do PQconsumeInput (when the backend channel gets
readable) I check for the return value. (0 == error) and generate a
notification manually, e.g. fixed string connection_closed) and pass it to the
TCL event queue. The only other thing I had to do is to comment out removing
all pending events in PgStopNotifyEventSource whenever the connection was
unexpectedly closed (so the manually generated event will not be deleted).

A broken backend connection triggers a notify event to the client (fixed
notification string "connection_closed") so proper action can be taken to switch
to another database server etc. Remember that this is event driven. If you have
applications, that have idle database connections most of the time, you'll get
immediate feedback of a dying server. Upon connection to the server issue a
pg_notify for notify event "connection_closed" and whenever the backend crashes
(which it does do in very very rare cases) you get an event driven recovery. (of
course the Tcl-Event loop has to be processed). Issuing a notification
"connection_closed" on a still working database could be used for switching to
another db-server (which I've actually impelemented right now).

Gerhard Hintermayer
2002-08-17 12:19:31 +00:00
Dave Cramer 7ffe65fefb removed duplicate code from jdbc2 classes 2002-08-16 19:37:57 +00:00
Dave Cramer b3766d9fa5 applied patch to fix encoding bug supplied by Jun Kawai 2002-08-16 19:35:46 +00:00
Dave Cramer 369e2b6afa Applied patch for MD5 bug submitted by Jun Kawai 2002-08-16 19:34:57 +00:00
Barry Lind 875364e5ff Performance tweaks to StringBuffer suggested by hhaag@gmx.de
Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/util/PGbytea.java
2002-08-16 17:51:38 +00:00
Bruce Momjian 6debc56bbc Remove interfaces/ssl. Was unclaimed stuff that had no more usefulness. 2002-08-16 04:29:15 +00:00
Bruce Momjian 1991fe74e1 This fixes some text as well as enforces the use of "drop table cascade"
since we moved from an implicate to explicate implementation.


Greg Copeland
2002-08-15 03:33:36 +00:00
Bruce Momjian 4f1ac055f1 Well, that certainly appeared to be very straight forward. pg.py and
syscat.py scripts were both modified.  pg.py uses it to cache a list of
pks (which is seemingly does for every db connection) and various
attributes.  syscat uses it to walk the list of system tables and
queries the various attributes from these tables.

In both cases, it seemingly makes sense to apply what you've requested.

Greg Copeland
2002-08-15 03:32:36 +00:00
Bruce Momjian 147aa84c1a http://archives.postgresql.org/pgsql-bugs/2002-06/msg00086.php and never
saw a fix offered up.  Since I'm gearing up to use Postgres and Python
soon, I figured I'd have a hand at trying to get this sucker addressed.
Apologies if this has already been plugged.  I looked in the archives
and never saw a response.

At any rate, I must admit I don't think I fully understand the
implications of some of the changes I made even though they appear to be
straight forward.  We all know the devil is in the details.  Anyone more
knowledgeable is requested to review my changes. :(

I also updated the advanced.py script in a somewhat nonsensical fashion
to make use of an int8 field in an effort to test this change.  It seems
to run okay, however, this is by no means an all exhaustive test.  So,
it's possible that a bumpy road may lay ahead for some.  On the other
hand...overflows (hopefully) previously lurked (long -> int conversion).

Greg Copeland
2002-08-15 03:31:45 +00:00
Bruce Momjian 7f4981f4af I'm giving a try at some TODO items. Currently it's the turn of the
PGPASSWORDFILE environment variable.  I have modified libpq to make use
of this variable.  I present the first cut here.

Currently the format for the file should be

host:port:database:user:password

Alvaro Herrera
2002-08-15 02:56:19 +00:00
Barry Lind b3dd55c651 Added support for JDBC3. The driver will now build under JDBC3 (i.e. Java 1.4).
This concludes my changes that restructured the code to support JDBC3.
The jdbc unit tests were also resturctured to allow different tests between
jdbc2 and jdbc3, although currently make check (aka ant test) for JDBC3 just
runs the JDBC2 tests.  Of special note the largeobject/PGblob and PGclob
classes have been moved under the jdbc2/jdbc3 specific directories as they
now differ by jdbc version.  Also note that this checkin removes the
PostgresqlDataSource and files in the xa directory.  A recent checkin has
added new datasource support that replaces the functionality provided by these
classes.

 Modified Files:
 	jdbc/build.xml
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSetMetaData.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2Connection.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSetMetaData.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java
 	jdbc/org/postgresql/jdbc2/Array.java
 	jdbc/org/postgresql/jdbc2/Jdbc2CallableStatement.java
 	jdbc/org/postgresql/jdbc2/Jdbc2Connection.java
 	jdbc/org/postgresql/jdbc2/Jdbc2DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc2/Jdbc2PreparedStatement.java
 	jdbc/org/postgresql/jdbc2/Jdbc2ResultSet.java
 	jdbc/org/postgresql/jdbc2/Jdbc2ResultSetMetaData.java
 	jdbc/org/postgresql/jdbc2/Jdbc2Statement.java
 	jdbc/org/postgresql/test/jdbc2/BatchExecuteTest.java
 	jdbc/org/postgresql/test/jdbc2/BlobTest.java
 	jdbc/org/postgresql/test/jdbc2/CallableStmtTest.java
 	jdbc/org/postgresql/test/jdbc2/ConnectionTest.java
 	jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java
 	jdbc/org/postgresql/test/jdbc2/DateTest.java
 	jdbc/org/postgresql/test/jdbc2/DriverTest.java
 	jdbc/org/postgresql/test/jdbc2/JBuilderTest.java
 	jdbc/org/postgresql/test/jdbc2/MiscTest.java
 	jdbc/org/postgresql/test/jdbc2/ResultSetTest.java
 	jdbc/org/postgresql/test/jdbc2/TimeTest.java
 	jdbc/org/postgresql/test/jdbc2/TimestampTest.java
 	jdbc/org/postgresql/test/jdbc2/UpdateableResultTest.java
 Added Files:
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2Blob.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2Clob.java
 	jdbc/org/postgresql/jdbc2/Jdbc2Blob.java
 	jdbc/org/postgresql/jdbc2/Jdbc2Clob.java
 	jdbc/org/postgresql/jdbc3/AbstractJdbc3Blob.java
 	jdbc/org/postgresql/jdbc3/AbstractJdbc3Clob.java
 	jdbc/org/postgresql/jdbc3/AbstractJdbc3Connection.java
 	jdbc/org/postgresql/jdbc3/AbstractJdbc3DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc3/AbstractJdbc3ResultSet.java
 	jdbc/org/postgresql/jdbc3/AbstractJdbc3Statement.java
 	jdbc/org/postgresql/jdbc3/Jdbc3Blob.java
 	jdbc/org/postgresql/jdbc3/Jdbc3CallableStatement.java
 	jdbc/org/postgresql/jdbc3/Jdbc3Clob.java
 	jdbc/org/postgresql/jdbc3/Jdbc3Connection.java
 	jdbc/org/postgresql/jdbc3/Jdbc3DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc3/Jdbc3PreparedStatement.java
 	jdbc/org/postgresql/jdbc3/Jdbc3ResultSet.java
 	jdbc/org/postgresql/jdbc3/Jdbc3ResultSetMetaData.java
 	jdbc/org/postgresql/jdbc3/Jdbc3Statement.java
 	jdbc/org/postgresql/test/TestUtil.java
 	jdbc/org/postgresql/test/jdbc2/Jdbc2TestSuite.java
 	jdbc/org/postgresql/test/jdbc3/Jdbc3TestSuite.java
 Removed Files:
 	jdbc/org/postgresql/PostgresqlDataSource.java
 	jdbc/org/postgresql/largeobject/PGblob.java
 	jdbc/org/postgresql/largeobject/PGclob.java
 	jdbc/org/postgresql/test/JDBC2Tests.java
 	jdbc/org/postgresql/xa/ClientConnection.java
 	jdbc/org/postgresql/xa/TwoPhaseConnection.java
 	jdbc/org/postgresql/xa/TxConnection.java
 	jdbc/org/postgresql/xa/XAConnectionImpl.java
 	jdbc/org/postgresql/xa/XADataSourceImpl.java
2002-08-14 20:35:40 +00:00
Bruce Momjian 46bb23ac01 Change NAMEDATALEN to 64, INDEX_MAX_KEYS/MAX_FUNC_ARGS to 32, per discussion on hackers. 2002-08-13 20:40:44 +00:00
Hiroshi Inoue 65dc2e0d8c Change LOCK statements to start new transaction
in auto-commit off mode.
2002-08-09 10:04:21 +00:00
Hiroshi Inoue 7dfc7e9e8c 1) Improve the handling of the queries like (select ..) union (select ..)
whose first non-space character is '('.
2) Handle Insert .. () VALUES ().
2002-08-01 03:07:50 +00:00
Tom Lane 9f1fc1080e Since we're depending on %option noyywrap in the main scanner now,
we may as well use it in all our flex files.  Make all the flex files
have a consistent set of options.
2002-07-30 16:33:08 +00:00
Dave Cramer 79d35b41aa added tests for crossReferences 2002-07-30 13:22:38 +00:00
Dave Cramer 55695148df changed test user back to test 2002-07-30 13:22:02 +00:00
Dave Cramer c82fed3d87 Added DataSource code and tests submitted by Aaron Mulder 2002-07-30 11:41:10 +00:00
Dave Cramer 6410c22265 changes for new Datasource 2002-07-30 11:38:13 +00:00
Hiroshi Inoue 67d0cb2d77 Fix a bug about automatic client_encoding setting. 2002-07-30 00:48:02 +00:00
Peter Eisentraut b0c3c48eb3 Assemble portability modules into libpgport library.
Some makefile simplifications.
2002-07-27 20:10:05 +00:00
Hiroshi Inoue c3fdf8925e Fix a bug about the handling of CX parameter of the connection string
reported by Sergey Smirnov.
2002-07-26 08:45:54 +00:00
Barry Lind 40c44166dc Fouth (and final) phase of restructuring to add jdbc3 support.
Modified Files:
 	jdbc/org/postgresql/Driver.java.in
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/jdbc1/Jdbc1Connection.java
 	jdbc/org/postgresql/jdbc1/Jdbc1ResultSet.java
 	jdbc/org/postgresql/jdbc2/Jdbc2Connection.java
 	jdbc/org/postgresql/jdbc2/Jdbc2ResultSet.java
 Added Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSetMetaData.java
 	jdbc/org/postgresql/jdbc1/Jdbc1DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc1/Jdbc1ResultSetMetaData.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSetMetaData.java
 	jdbc/org/postgresql/jdbc2/Jdbc2DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc2/Jdbc2ResultSetMetaData.java
 Removed Files:
 	jdbc/org/postgresql/jdbc1/DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc1/ResultSetMetaData.java
 	jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc2/ResultSetMetaData.java
2002-07-26 05:29:35 +00:00
Barry Lind 68c6eff945 Third phase of restructuring to add jdbc3 support.
Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/jdbc1/DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc1/Jdbc1Connection.java
 	jdbc/org/postgresql/jdbc1/Jdbc1ResultSet.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java
 	jdbc/org/postgresql/jdbc2/Array.java
 	jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc2/Jdbc2Connection.java
 	jdbc/org/postgresql/jdbc2/Jdbc2ResultSet.java
 Added Files:
 	jdbc/org/postgresql/jdbc1/Jdbc1CallableStatement.java
 	jdbc/org/postgresql/jdbc2/Jdbc2CallableStatement.java
 Removed Files:
 	jdbc/org/postgresql/jdbc1/CallableStatement.java
 	jdbc/org/postgresql/jdbc2/CallableStatement.java
 	jdbc/org/postgresql/jdbc2/UpdateableResultSet.java
2002-07-25 22:45:28 +00:00
Barry Lind 8d600a7d1f Second phase of restructuring to add jdbc3 support. 2002-07-24 22:08:45 +00:00
Barry Lind 1e3187366c Initial restructuring to add jdbc3 support. There was a significant amount
of duplicated code between the jdbc1 and jdbc2.  This checkin restructures
the code so that the duplication is removed so that the jdbc3 support
can be added without adding yet another copy of everything.  Also many
classes were renamed to avoid confusion with multiple different objects
having the same name.  The timestamp tests were also updated to add support
for testing timestamp without time zone in addition to timestamp with time zone

 Modified Files:
 	jdbc/Makefile jdbc/build.xml jdbc/example/ImageViewer.java
 	jdbc/example/basic.java jdbc/example/blobtest.java
 	jdbc/example/threadsafe.java
 	jdbc/org/postgresql/Driver.java.in
 	jdbc/org/postgresql/Field.java
 	jdbc/org/postgresql/core/QueryExecutor.java
 	jdbc/org/postgresql/fastpath/Fastpath.java
 	jdbc/org/postgresql/jdbc1/CallableStatement.java
 	jdbc/org/postgresql/jdbc1/DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc1/PreparedStatement.java
 	jdbc/org/postgresql/jdbc2/Array.java
 	jdbc/org/postgresql/jdbc2/CallableStatement.java
 	jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
 	jdbc/org/postgresql/jdbc2/PreparedStatement.java
 	jdbc/org/postgresql/jdbc2/UpdateableResultSet.java
 	jdbc/org/postgresql/largeobject/LargeObjectManager.java
 	jdbc/org/postgresql/largeobject/PGblob.java
 	jdbc/org/postgresql/largeobject/PGclob.java
 	jdbc/org/postgresql/test/jdbc2/BlobTest.java
 	jdbc/org/postgresql/test/jdbc2/ConnectionTest.java
 	jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java
 	jdbc/org/postgresql/test/jdbc2/TimestampTest.java
 	jdbc/org/postgresql/test/jdbc2/UpdateableResultTest.java
 	jdbc/org/postgresql/util/Serialize.java
 Added Files:
 	jdbc/org/postgresql/PGConnection.java
 	jdbc/org/postgresql/PGStatement.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/jdbc1/Jdbc1Connection.java
 	jdbc/org/postgresql/jdbc1/Jdbc1ResultSet.java
 	jdbc/org/postgresql/jdbc1/Jdbc1Statement.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2Connection.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java
 	jdbc/org/postgresql/jdbc2/Jdbc2Connection.java
 	jdbc/org/postgresql/jdbc2/Jdbc2ResultSet.java
 	jdbc/org/postgresql/jdbc2/Jdbc2Statement.java
 Removed Files:
 	jdbc/org/postgresql/Connection.java
 	jdbc/org/postgresql/ResultSet.java
 	jdbc/org/postgresql/Statement.java
 	jdbc/org/postgresql/jdbc1/Connection.java
 	jdbc/org/postgresql/jdbc1/ResultSet.java
 	jdbc/org/postgresql/jdbc1/Statement.java
 	jdbc/org/postgresql/jdbc2/Connection.java
 	jdbc/org/postgresql/jdbc2/ResultSet.java
 	jdbc/org/postgresql/jdbc2/Statement.java
2002-07-23 03:59:55 +00:00
Michael Meskes 4be24fe88f Fixed some minor typos. 2002-07-21 11:09:41 +00:00
Michael Meskes 2297f3982b Re-Committed old file. 2002-07-21 08:20:07 +00:00
Michael Meskes a58930bbd5 Synced parser yet again.
Michael
2002-07-20 08:24:18 +00:00
Bruce Momjian b6d2faaf24 Hello, i noticed that win32 native stopped working/compiling after the SSL merge
.
So i took the opportunity to fix some stuff:

1. Made the thing compile (typos & needed definitions) with the new pqsecure_* s
tuff, and added fe-secure.c to the win32.mak makefile.
2. Fixed some MULTIBYTE compile errors (when building without MB support).
3. Made it do that you can build with debug info: "nmake -f win32.mak DEBUG=1".
4. Misc small compiler speedup changes.

The resulting .dll has been tested in production, and everything seems ok.
I CC:ed -hackers because i'm not sure about two things:

1. In libpq-int.h I typedef ssize_t as an int because Visual C (v6.0)
doesn't de fine ssize_t. Is that ok, or is there any standard about what
type should be use d for ssize_t?

2. To keep the .dll api consistent regarding MULTIBYTE I just return -1
in fe-connect.c:PQsetClientEncoding() instead of taking away the whole
function. I wonder if i should do any compares with the
conn->client_encoding and return 0 if not hing would have changed (if so
how do i check that?).

Regards

Magnus Naeslund
2002-07-20 05:43:31 +00:00
Bruce Momjian 8f211f8a84 Fix for PgTransaction class to make these visible to C apps:
ExecStatusType BeginTransaction();
   ExecStatusType EndTransaction();

Piotr Klaban
2002-07-18 04:49:30 +00:00
Bruce Momjian 7f43165dd2 Make src/backend/port/*.c file location dependent only on configure.in. 2002-07-18 03:59:49 +00:00
Tatsuo Ishii eb335a034b I have committed many support files for CREATE CONVERSION. Default
conversion procs and conversions are added in initdb. Currently
supported conversions are:

UTF-8(UNICODE) <--> SQL_ASCII, ISO-8859-1 to 16, EUC_JP, EUC_KR,
		    EUC_CN, EUC_TW, SJIS, BIG5, GBK, GB18030, UHC,
		    JOHAB, TCVN

EUC_JP <--> SJIS
EUC_TW <--> BIG5
MULE_INTERNAL <--> EUC_JP, SJIS, EUC_TW, BIG5

Note that initial contents of pg_conversion system catalog are created
in the initdb process. So doing initdb required is ideal, it's
possible to add them to your databases by hand, however. To accomplish
this:

psql -f your_postgresql_install_path/share/conversion_create.sql your_database

So I did not bump up the version in cataversion.h.

TODO:
Add more conversion procs
Add [CASCADE|RESTRICT] to DROP CONVERSION
Add tuples to pg_depend
Add regression tests
Write docs
Add SQL99 CONVERT command?
--
Tatsuo Ishii
2002-07-18 02:02:30 +00:00
Barry Lind cdebcad6af fixed bug in support for timestamp without time zone reported by Yuva Chandolu (ychandolu@ebates.com) 2002-07-16 21:05:17 +00:00
Bruce Momjian b9104e3a97 Remove certain Makefile dependencies by using full pathnames in
configure.in.
2002-07-15 21:34:05 +00:00
Hiroshi Inoue 5fad748eb8 Fix a bug about the handling of '.' in parse.c. 2002-07-15 02:56:39 +00:00
Dave Cramer 791a40f943 Changed getCrossReference to return information about each composite key seperately
It used to return them as a,b in one row, and now returns
a in one row, and b in one row
2002-07-12 13:07:48 +00:00
Hiroshi Inoue b82b2db7c1 An improvement of User Interface(Setup dialog) by Dave Page. 2002-07-12 02:02:26 +00:00
Hiroshi Inoue 59e5d516aa 1) Fix a memory leak in use declare/fetch mode.
2) Change default build mode to multibyte(Windows).
2002-07-12 01:41:25 +00:00
Hiroshi Inoue 263db2e586 Make NAMEDATALEN changeable at compile time. 2002-07-11 01:52:46 +00:00
Barry Lind d676e29d41 fix bug in getTime() with fractional seconds reported by Laurette Cisneros (laurette@nextbus.com) 2002-07-10 00:51:36 +00:00
Barry Lind f170e61d9b fixed bug reported by Michael, Dietrich (mdt@emdete.de) where a large object handle was being used after the end of the transaction and thus resulting in an error. 2002-07-05 18:50:27 +00:00
Hiroshi Inoue 8831c35a19 Fix a bug reported by Zhou Han. 2002-07-05 01:31:41 +00:00
Bruce Momjian a4485ea894 Indent libpq++ as mentioned in email. Format was terrible, and this
will make fixing things easier.
2002-07-02 16:32:19 +00:00
Michael Meskes a3ec44a5d3 Commit old versions into main branch again.
Michael
2002-07-01 06:56:10 +00:00
Michael Meskes 9786223480 Committing parser changes. Note, however, that the development bison seems ot have a problem on my home machine. So these go in untested for the time being. But at least I have them in the archive.
Michael
2002-06-30 09:34:14 +00:00
Hiroshi Inoue c9f8704251 1) prevent setting of KSQO on 7.3+ servers(Thanks to Dave Page).
2) Allow LF->CR/LF conversion under UNICODE driver.
2002-06-28 02:44:15 +00:00
Barry Lind 23e5da8a48 fixed build.xml to echo correct jdbc version under ant1.6 2002-06-27 04:38:01 +00:00
Barry Lind ca4ca0b098 general cleanup of jdbc code 2002-06-27 03:37:30 +00:00
Barry Lind e37cce05b7 translation patch submitted by Zhenbang Wei forth@mail.net.tw 2002-06-26 03:21:27 +00:00
Barry Lind 895a45ae3d patch submitted by Jason Davies jason@netspade.com to provide proper java class name for a byte[] 2002-06-26 03:16:57 +00:00
Dave Cramer 393b085a72 fixed retrieval of foreign/primary keys in imported/exported keys 2002-06-25 16:30:49 +00:00
Hiroshi Inoue 20241a4c54 1) Add support for GB18030.
2) Fix a bug about the handling of large objects.
2002-06-25 01:54:19 +00:00
Barry Lind 12a28d12bb patch to add support for callable statements to the jdbc driver. The patch was submitted by Paul Bethe pmbethe@yahoo.com 2002-06-24 06:16:27 +00:00
Barry Lind 33086553c0 patch to update zh_TW message file for jdbc submitted by Zhenband Wei (forth@mail.net.tw) 2002-06-24 05:14:26 +00:00
Barry Lind 99aa2f8ef9 patch submitted by Jason Davies jason@netspade.com to improve ResultSetMetaData.getColumnClassName() support 2002-06-24 05:09:29 +00:00
Barry Lind c50bf0190f fixed bug reported by Wolfgang Winter w.winter@logitags.com where historic timestamps which do not have timezone info were being interpreted in local timezone instead of GMT. Also added a check to support timestamp vs. timestamptz in this code 2002-06-24 04:53:05 +00:00
Bruce Momjian aad4cc7d0d Remove unused INET6 variable. 2002-06-23 20:30:48 +00:00
Bruce Momjian eb3901ec0d Remove INET6 from SSL. We don't support INET6 yet. 2002-06-23 14:56:16 +00:00
Bruce Momjian d84fe82230 Update copyright to 2002. 2002-06-20 20:29:54 +00:00
Bruce Momjian c2c2fd57ee Improve COPY syntax to use WITH clause, keep backward compatibility. 2002-06-20 16:00:44 +00:00
Bruce Momjian 134a1c8178 Use KAME accessor macros for addr8. 2002-06-17 15:55:09 +00:00
Michael Meskes 2fabb99388 Fixed parser bug concerning octal numbers in single quotes. 2002-06-17 13:23:27 +00:00
Dave Cramer 0daee96ed1 implemented refresh row 2002-06-16 18:26:53 +00:00
Tom Lane 32fecad80a Clean up gcc warnings. Avoid the bad habit of putting externs in .c
files rather than a header file where they belong.  Pay some modicum
of attention to picking global routine names that aren't likely to
conflict with surrounding applications.
2002-06-15 22:06:09 +00:00
Bruce Momjian 79ff2e96de PATCH SSL_pending() checks in libpq/fe-misc.c:
I am no longer pursuing a total non-blocking implementation.  I haven't
found a good way to test it with the type of work that I do with
PostgreSQL.  I do use blocking SSL sockets with this mod and have had no
problem whatsoever.  The bug that I fixed in this patch is exceptionally
hard to reproduce reliably.

Jack Bates
2002-06-15 20:01:31 +00:00
Bruce Momjian 240de617fb The method PgLargeObject::LOid() is missing an implementation in the .cc
file.


The program seems to compile ok, but when linking a program that uses
the call,
g++ chokes with an undefined reference error.


If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
I include the code:

Oid PgLargeObject::LOid(){
  return pgObject;
}

in the .cc file.

Chris Traylor
2002-06-15 19:30:40 +00:00
Bruce Momjian 2e58024066 This patch fixes a few minor problems with libpq++: remove the deprecated
PQExec(" ") in the wrapper around PQnotifies(), fix the Makefile for
the examples so that they will actually compile properly (with the
exception of #5, which depends on internal headers), make a minor change
to libpq++.h so that "make examples" now works on my machine, update
some documentation, fix some grammatical problems, and remove some of
the more hideous comments.

Neil Conway
2002-06-15 18:49:29 +00:00
Thomas G. Lockhart 133df7ce70 Add LOCALTIME and LOCALTIMESTAMP functions per SQL99 standard.
Remove ODBC-compatible empty parentheses from calls to SQL99 functions
 for which these parentheses do not match the standard.
Update the ODBC driver to ensure compatibility with the ODBC standard
 for these functions (e.g. CURRENT_TIMESTAMP, CURRENT_USER, etc).
Include a new appendix in the User's Guide which lists the labeled features
 for SQL99 (the labeled features replaced the "basic", "intermediate",
 and "advanced" categories from SQL92). features.sgml does not yet split
 this list into "supported" and "unsupported" lists.
2002-06-15 03:00:09 +00:00
Dave Cramer fd8b153912 added empty result set testing 2002-06-14 14:01:36 +00:00
Dave Cramer 6e2fab0a41 added empty result set testing 2002-06-14 10:56:13 +00:00
Bruce Momjian 1ed4a922b8 Yet another SSL patch. :-) This one adds some informational messages
on the server, if DebugLvl >= 2.

The patch also includes a late addition to the last patch
(X509_check_private_key()).  I'm not sure why it the currect
revision wasn't tagged.


Bear Giles
2002-06-14 04:38:04 +00:00
Bruce Momjian eb7afc1407 SSL patch that adds support for optional client certificates.
If the user has certificates in $HOME/.postgresql/postgresql.crt
and $HOME/.postgresql/postgresql.key exist, they are provided
to the server.  The certificate used to sign this cert must be
known to the server, in $DataDir/root.crt.  If successful, the
cert's "common name" is logged.

Client certs are not used for authentication, but they could be
via the port->peer (X509 *), port->peer_dn (char *) or
port->peer_cn (char *) fields.  Or any other function could be
used, e.g., many sites like the issuer + serial number hash.

Bear Giles
2002-06-14 04:36:58 +00:00
Bruce Momjian 55d053233c SSL support for ephemeral DH keys.
As the comment headers in be-secure.c discusses, EPH preserves
confidentiality even if the static private key (which is usually
kept unencrypted) is compromised.

Because of the value of this, common default values are hard-coded
to protect the confidentiality of the data even if an attacker
successfully deletes or modifies the external file.

Bear Giles
2002-06-14 04:31:49 +00:00
Bruce Momjian 19570420f5 UPDATED PATCH:
Attached are a revised set of SSL patches.  Many of these patches
are motivated by security concerns, it's not just bug fixes.  The key
differences (from stock 7.2.1) are:

*) almost all code that directly uses the OpenSSL library is in two
   new files,

     src/interfaces/libpq/fe-ssl.c
     src/backend/postmaster/be-ssl.c

   in the long run, it would be nice to merge these two files.

*) the legacy code to read and write network data have been
   encapsulated into read_SSL() and write_SSL().  These functions
   should probably be renamed - they handle both SSL and non-SSL
   cases.

   the remaining code should eliminate the problems identified
   earlier, albeit not very cleanly.

*) both front- and back-ends will send a SSL shutdown via the
   new close_SSL() function.  This is necessary for sessions to
   work properly.

   (Sessions are not yet fully supported, but by cleanly closing
   the SSL connection instead of just sending a TCP FIN packet
   other SSL tools will be much happier.)

*) The client certificate and key are now expected in a subdirectory
   of the user's home directory.  Specifically,

	- the directory .postgresql must be owned by the user, and
	  allow no access by 'group' or 'other.'

	- the file .postgresql/postgresql.crt must be a regular file
	  owned by the user.

	- the file .postgresql/postgresql.key must be a regular file
	  owned by the user, and allow no access by 'group' or 'other'.

   At the current time encrypted private keys are not supported.
   There should also be a way to support multiple client certs/keys.

*) the front-end performs minimal validation of the back-end cert.
   Self-signed certs are permitted, but the common name *must*
   match the hostname used by the front-end.  (The cert itself
   should always use a fully qualified domain name (FDQN) in its
   common name field.)

   This means that

	  psql -h eris db

   will fail, but

	  psql -h eris.example.com db

   will succeed.  At the current time this must be an exact match;
   future patches may support any FQDN that resolves to the address
   returned by getpeername(2).

   Another common "problem" is expiring certs.  For now, it may be
   a good idea to use a very-long-lived self-signed cert.

   As a compile-time option, the front-end can specify a file
   containing valid root certificates, but it is not yet required.

*) the back-end performs minimal validation of the client cert.
   It allows self-signed certs.  It checks for expiration.  It
   supports a compile-time option specifying a file containing
   valid root certificates.

*) both front- and back-ends default to TLSv1, not SSLv3/SSLv2.

*) both front- and back-ends support DSA keys.  DSA keys are
   moderately more expensive on startup, but many people consider
   them preferable than RSA keys.  (E.g., SSH2 prefers DSA keys.)

*) if /dev/urandom exists, both client and server will read 16k
   of randomization data from it.

*) the server can read empheral DH parameters from the files

     $DataDir/dh512.pem
     $DataDir/dh1024.pem
     $DataDir/dh2048.pem
     $DataDir/dh4096.pem

   if none are provided, the server will default to hardcoded
   parameter files provided by the OpenSSL project.

Remaining tasks:

*) the select() clauses need to be revisited - the SSL abstraction
   layer may need to absorb more of the current code to avoid rare
   deadlock conditions.  This also touches on a true solution to
   the pg_eof() problem.

*) the SIGPIPE signal handler may need to be revisited.

*) support encrypted private keys.

*) sessions are not yet fully supported.  (SSL sessions can span
   multiple "connections," and allow the client and server to avoid
   costly renegotiations.)

*) makecert - a script that creates back-end certs.

*) pgkeygen - a tool that creates front-end certs.

*) the whole protocol issue, SASL, etc.

 *) certs are fully validated - valid root certs must be available.
    This is a hassle, but it means that you *can* trust the identity
    of the server.

 *) the client library can handle hardcoded root certificates, to
    avoid the need to copy these files.

 *) host name of server cert must resolve to IP address, or be a
    recognized alias.  This is more liberal than the previous
    iteration.

 *) the number of bytes transferred is tracked, and the session
    key is periodically renegotiated.

 *) basic cert generation scripts (mkcert.sh, pgkeygen.sh).  The
    configuration files have reasonable defaults for each type
    of use.

Bear Giles
2002-06-14 04:23:17 +00:00
Bruce Momjian eb43af3210 Back out SSL changes. Newer patch available. 2002-06-14 04:09:37 +00:00
Bruce Momjian a9bd17616e Attached are a revised set of SSL patches. Many of these patches
are motivated by security concerns, it's not just bug fixes.  The key
differences (from stock 7.2.1) are:

*) almost all code that directly uses the OpenSSL library is in two
   new files,

     src/interfaces/libpq/fe-ssl.c
     src/backend/postmaster/be-ssl.c

   in the long run, it would be nice to merge these two files.

*) the legacy code to read and write network data have been
   encapsulated into read_SSL() and write_SSL().  These functions
   should probably be renamed - they handle both SSL and non-SSL
   cases.

   the remaining code should eliminate the problems identified
   earlier, albeit not very cleanly.

*) both front- and back-ends will send a SSL shutdown via the
   new close_SSL() function.  This is necessary for sessions to
   work properly.

   (Sessions are not yet fully supported, but by cleanly closing
   the SSL connection instead of just sending a TCP FIN packet
   other SSL tools will be much happier.)

*) The client certificate and key are now expected in a subdirectory
   of the user's home directory.  Specifically,

	- the directory .postgresql must be owned by the user, and
	  allow no access by 'group' or 'other.'

	- the file .postgresql/postgresql.crt must be a regular file
	  owned by the user.

	- the file .postgresql/postgresql.key must be a regular file
	  owned by the user, and allow no access by 'group' or 'other'.

   At the current time encrypted private keys are not supported.
   There should also be a way to support multiple client certs/keys.

*) the front-end performs minimal validation of the back-end cert.
   Self-signed certs are permitted, but the common name *must*
   match the hostname used by the front-end.  (The cert itself
   should always use a fully qualified domain name (FDQN) in its
   common name field.)

   This means that

	  psql -h eris db

   will fail, but

	  psql -h eris.example.com db

   will succeed.  At the current time this must be an exact match;
   future patches may support any FQDN that resolves to the address
   returned by getpeername(2).

   Another common "problem" is expiring certs.  For now, it may be
   a good idea to use a very-long-lived self-signed cert.

   As a compile-time option, the front-end can specify a file
   containing valid root certificates, but it is not yet required.

*) the back-end performs minimal validation of the client cert.
   It allows self-signed certs.  It checks for expiration.  It
   supports a compile-time option specifying a file containing
   valid root certificates.

*) both front- and back-ends default to TLSv1, not SSLv3/SSLv2.

*) both front- and back-ends support DSA keys.  DSA keys are
   moderately more expensive on startup, but many people consider
   them preferable than RSA keys.  (E.g., SSH2 prefers DSA keys.)

*) if /dev/urandom exists, both client and server will read 16k
   of randomization data from it.

*) the server can read empheral DH parameters from the files

     $DataDir/dh512.pem
     $DataDir/dh1024.pem
     $DataDir/dh2048.pem
     $DataDir/dh4096.pem

   if none are provided, the server will default to hardcoded
   parameter files provided by the OpenSSL project.

Remaining tasks:

*) the select() clauses need to be revisited - the SSL abstraction
   layer may need to absorb more of the current code to avoid rare
   deadlock conditions.  This also touches on a true solution to
   the pg_eof() problem.

*) the SIGPIPE signal handler may need to be revisited.

*) support encrypted private keys.

*) sessions are not yet fully supported.  (SSL sessions can span
   multiple "connections," and allow the client and server to avoid
   costly renegotiations.)

*) makecert - a script that creates back-end certs.

*) pgkeygen - a tool that creates front-end certs.

*) the whole protocol issue, SASL, etc.

 *) certs are fully validated - valid root certs must be available.
    This is a hassle, but it means that you *can* trust the identity
    of the server.

 *) the client library can handle hardcoded root certificates, to
    avoid the need to copy these files.

 *) host name of server cert must resolve to IP address, or be a
    recognized alias.  This is more liberal than the previous
    iteration.

 *) the number of bytes transferred is tracked, and the session
    key is periodically renegotiated.

 *) basic cert generation scripts (mkcert.sh, pgkeygen.sh).  The
    configuration files have reasonable defaults for each type
    of use.

Bear Giles
2002-06-14 03:56:47 +00:00
Dave Cramer b1ac89f594 removed personal test parameters 2002-06-13 14:37:30 +00:00
Dave Cramer 5598cbf641 Added test for newly implemented updateable result sets 2002-06-13 14:06:11 +00:00
Dave Cramer 603c46d8ce changes to accomodate updateable resultset mostly just call setSqlQuery on execute 2002-06-13 14:02:50 +00:00
Dave Cramer 7873bed77c Implemented updateable result sets based on raghu nidagal implementation 2002-06-13 13:52:16 +00:00
Dave Cramer ad88ee1e04 changed some commented out messages to use the Driver.debug and fixed first to read the underlying data into rowbuffer 2002-06-13 13:48:28 +00:00
Dave Cramer 3f857600b2 added messages for updateable result sets 2002-06-13 13:43:02 +00:00
Michael Meskes 0f865e17e2 Applied Lee Kindness' patch to fix one of memory allocation with floating point numbers. 2002-06-12 12:06:53 +00:00
Hiroshi Inoue 0484700cda 1) Fix a bug *double error message*.
2) Fix a bug *passowrd prompt in case of md5 authentication*.
3) Improve the DSN setup dialog.
2002-06-12 02:27:44 +00:00
Jan Wieck 469cb65aca Katherine Ward wrote:
> Changes to avoid collisions with WIN32 & MFC names...
> 1.  Renamed:
>       a.  PROC => PGPROC
>       b.  GetUserName() => GetUserNameFromId()
>       c.  GetCurrentTime() => GetCurrentDateTime()
>       d.  IGNORE => IGNORE_DTF in include/utils/datetime.h & utils/adt/datetim
>
> 2.  Added _P to some lex/yacc tokens:
>       CONST, CHAR, DELETE, FLOAT, GROUP, IN, OUT

Jan
2002-06-11 13:40:53 +00:00
Barry Lind b465f5307f The patch does the following:
Allows you to set the loglevel at runtime by adding ?loglevel=X to the connection URL, where 1 = INFO and 2 = DEBUG.
  Automatically turns on logging by calling DriverManager.setPrintWriter(new PrintWriter(System.out)) if one is not already set.
Adds a Driver.info() message that prints out the version number
Adds member variables logDebug and logInfo that can be checked before making logging methods calls
Adds a build number to the version number string.  This build number will need to be manually incremented when we see fit.

----------------------------------------------------------------------
Modified Files:
 	org/postgresql/Connection.java org/postgresql/Driver.java.in
 	org/postgresql/fastpath/Fastpath.java
 	org/postgresql/jdbc1/DatabaseMetaData.java
 	org/postgresql/jdbc2/Connection.java
 	org/postgresql/jdbc2/DatabaseMetaData.java
 	org/postgresql/largeobject/LargeObjectManager.java
 	org/postgresql/util/PSQLException.java
 	org/postgresql/util/Serialize.java
----------------------------------------------------------------------
2002-06-11 02:55:16 +00:00
Bruce Momjian ccab6f7402 Remove int16 from libpgeasy examples. Improve error reporting. 2002-06-07 16:53:40 +00:00
Barry Lind 936ff27696 fixed bug reported by cc.ais40@wanadoo.fr where getObject was returning an Integer for a smallint datatype instead of a Short 2002-06-07 16:46:24 +00:00
Bruce Momjian ce4a287f43 Fix interface example errors causes by backend changes.
Permaine Cheung
2002-06-07 03:55:15 +00:00
Dave Cramer 106dda2915 change table name to lower case in getColumns 2002-06-06 14:47:52 +00:00
Hiroshi Inoue 6cfb3ec593 Add missing win_setup.h. 2002-06-06 09:47:25 +00:00
Hiroshi Inoue 89d6f6808c Add *Int8 As* option. 2002-06-06 04:50:47 +00:00
Dave Cramer 520695701c fixed getImported/ExportedKeys to be simpler, and return the correct number of keys 2002-06-05 19:12:01 +00:00
Barry Lind b48b4ab48e fixed bug reported by Noel Rappin (nrappin@sockeye.com) java Array type handled Timestamps incorrectly 2002-06-03 17:52:05 +00:00
Bruce Momjian e0faed4bee Small patch to correct the default arraysize associated
with the Cursor object's fetchmany() method.  The API and
inline documentation state that the default is 1.  It
currently defaults to 5.

Patrick Macdonald
2002-06-03 17:42:11 +00:00
Bruce Momjian de1f32efc1 Add PQescapeString and PQescapeBytea for Win32. 2002-06-02 22:36:30 +00:00
Bruce Momjian 6bb39991da Allow pod2man 5.005p3 to work with our current sources. 2002-06-02 21:37:26 +00:00
Dave Cramer 3dd13ffd95 small fix to testExportedKeys 2002-05-30 16:39:26 +00:00
Dave Cramer 1ffd044af7 added imported/exported key testDatabaseMetaDataTest.java 2002-05-30 16:26:55 +00:00
Peter Eisentraut 7662419f1b Change PL/Perl and Pg interface build to use configured compiler and
Makefile.shlib system, not MakeMaker.
2002-05-28 16:57:53 +00:00
Hiroshi Inoue 79420840ee 1) Support Keyset Driven driver cursors.
2) Supprt ARD precision/scale and SQL_C_NUEMRIC.
3) Minimal implementation of SQLGetDiagField().
4) SQLRowCount() reports the result of SQLSetPos and SQLBulkOperation.
5) int8 -> SQL_NUMERIC for Microsoft Jet.
6) Support isolation level change.
7) ODBC3.0 SQLSTATE code.
8) Append mode log files.
2002-05-22 05:51:03 +00:00
Michael Meskes 7f660adeb1 - Fixed some parser bugs.
- Removed some simple rules to work arounf bison limit for now.
        - Update c_keywords.c to reflect changes in keywords.c.
2002-05-20 09:29:41 +00:00
Michael Meskes f35ced3de9 - Fixed reduce/reduce conflict in parser.
- Synced preproc.y with gram.y.
        - Synced pgc.l with scan.l.
        - Synced keywords.c.
2002-05-19 20:00:53 +00:00
Tom Lane f0811a74b3 Merge the last few variable.c configuration variables into the generic
GUC support.  It's now possible to set datestyle, timezone, and
client_encoding from postgresql.conf and per-database or per-user
settings.  Also, implement rollback of SET commands that occur in a
transaction that later fails.  Create a SET LOCAL var = value syntax
that sets the variable only for the duration of the current transaction.
All per previous discussions in pghackers.
2002-05-17 01:19:19 +00:00
Barry Lind e25c93c7eb fixed problem connecting to server with client_min_messages set to debug. The code was not expecting to receive notice messages during the connection handshake. 2002-05-14 03:00:35 +00:00
Hiroshi Inoue 16e22de53a Add a file for version control. 2002-05-09 04:10:22 +00:00