aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
Commit message (Collapse)AuthorAge
* Attached is a simple one line patch for the problem reported in theBruce Momjian2001-08-22
| | | | | | | | | | | | | | | following email. > > The problem: When I call getBigDecimal() on a ResultSet, it > > sometimes throws an exception: > > > > Bad BigDecimal 174.50 > > at org.postgresql.jdbc2.ResultSet.getBigDecimal(ResultSet.java:373) > > at org.postgresql.jdbc2.ResultSet.getBigDecimal(ResultSet.java:984) > > ...blah blah blah... > > org.postgresql.util.PSQLException: Bad BigDecimal 174.50 Barry Lind
* Here's a resend of the patch.gz. I gunzip'ed it fine hereBruce Momjian2001-08-21
| | | | | | | | | | | | so it may be a transit problem. Also removed the 'txt' suffix in case that was confusing some transport layer trying to be too inteligent for our own good. This may have been because the Array.java class from the previous patch didn't seem to have made it into the snapshot build for some reason. This patch should at least fix that issue. Greg Zoller
* > Ok, where's a "system dependent hack" :)Bruce Momjian2001-08-21
| | | | | | | | | | | | | | | | | | | | > It seems that win9x doesn't have the "netmsg.dll" so it defaults to "normal" > FormatMessage. > I wonder if one could load wsock32.dll or winsock.dll on those systems > instead of netmsg.dll. > > Mikhail, could you please test this code on your nt4 system? > Could someone else test this code on a win98/95 system? > > It works on win2k over here. It works on win2k here too but not on win98/95 or winNT. Anyway, attached is the patch which uses Magnus's my_sock_strerror function (renamed to winsock_strerror). The only difference is that I put the code to load and unload netmsg.dll in the libpqdll.c (is this OK Magnus?). Mikhail Terekhov
* Fix SCM_CREDS for FreeBSD, from Teodor Sigaev.Bruce Momjian2001-08-21
|
* Add new jdbc array file.Bruce Momjian2001-08-21
|
* Add ECPGd_cardinality to end of enum list so ecpg compiles.Bruce Momjian2001-08-21
|
* Add missing include for SCM_CREDS.Bruce Momjian2001-08-21
|
* Fix a lot of compile errors on unix.Hiroshi Inoue2001-08-21
| | | | Fix '\\' handling for bytea type.
* >Bruce Momjian2001-08-21
| | | | | | | | | | | | | | | | | | | | > Shouldn't > > throw new PSQLException("metadata unavailable"); > > in getTypeInfo() be something like: > > throw new PSQLException("postgresql.meta.unavailable"); > > to allow translation of the error message in the > errors*.properties files? You're right. Attached is an updated patch that also includes a message in error.properties. I've attempted a French message in errors_fr.properties but beware that I haven't written French in quite a few years. Don't know Italian, German, or Dutch so I can't do those. Liam Stewart
* Add SCM_CREDS to get owner of unix-domain socket on BSD-like systems.Bruce Momjian2001-08-21
|
* - Synced preproc.y with gram.y.Michael Meskes2001-08-19
| | | | - Include some patches by Christof Petig <christof.petig@wtal.de>.
* 1) Change all internal SQL function calls fromHiroshi Inoue2001-08-18
| | | | | | | | SQLxxxx() to PGAPI_xxxx(). 2) Handle an escaped date/time format as a parameter. 3) Improve the tuple allocation a little. 4) The preparation of ODBC 3.0 a little. 5) Updatable cursors(may be deprecated before long).
* Reorder MD5/crypt so MD5 comes first in the code.Bruce Momjian2001-08-17
|
* Remove some unneeded dashes from libpq comments.Bruce Momjian2001-08-17
|
* Add \n to libpq print output where needed.Bruce Momjian2001-08-17
|
* This patch updates some comments in the DatabaseMetaData classes toBruce Momjian2001-08-17
| | | | | | | reflect a mail thread that discussed our conformance (or lack thereof) to the SQL92 spec. Barry Lind
* Thanks for your feedback (and patience). Enclosed is my thirdBruce Momjian2001-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | attempt at a patch to 7.1.2 to support Array. [I think I've solved the mangled patch problem. Hotmail seems to try to format the text file, so gzipping it should solve this problem.] In this patch I've incorporated Barry's feedback. Specifically: 1) OIDs are no longer hard-coded into Array.java. In order to support this change I added a getOID(String) method to Field.java which receives a PostgreSQL field type and returns a value from java.sql.Types. I couldn't get away from using OIDs altogether because the JDBC spec for Array specifies that some methods return a ResultSet. This requires I construct Field objects, which means I need OIDs. At least this approach doesn't hard code these values. A Hashtable cache has been added to Field so that an SQL lookup isn't necessary (following the model already in Field.java). 2) Rewired the base formatting code in ResultSet.java to use 'to' methods, which are then exposed as static methods in ResultSet. These methods are used in Array to format the data without duplications in the code. 3) Artifact call to first() in ResultSet.getArray() removed. Greg Zoller
* Attached is the patch requested by Tom Lane (see below). ItBruce Momjian2001-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | includes two changes in the JDBC driver: 1) When connected to a backend >= 7.2: use obj_description() and col_description() instead of direct access to pg_description. 2) In DatabaseMetaData.getTables()/getColumns()/getProcedures(): when there is no comment on the object, return null in the REMARKS column of the ResultSet, instead of the default string "no remarks". Change 2 first appeared as a side-effect of change 1, but it is actually more compliant with the JDBC spec: "String object containing an explanatory comment on the table/column/procedure, which may be null". The default string "no remarks" was strictly speaking incorrect, as it could not be distinguished from a real user comment "no remarks". So I removed the default string completely. Change 2 might break existing code that doesn't follow the JDBC spec and isn't prepared to handle a null in the REMARKS column of getTables()/getColumns()/getProcedures. Patch tested with jdbc2 against both a 7.1 and a CVS tip backend. I did not have a jdbc1 environment to build and test with, but since the touched code is identical in jdbc1 and jdbc2 I don't foresee any problems. Regards, Ren? Pijlman
* Force crypt() salt to be null-terminated.Bruce Momjian2001-08-17
|
* Add 4-byte MD5 salt.Bruce Momjian2001-08-17
|
* Sequences are now based on int8, not int4, arithmetic. SERIAL pseudo-typeTom Lane2001-08-16
| | | | | | | | has an alias SERIAL4 and a sister SERIAL8. SERIAL8 is just the same except the created column is type int8 not int4. initdb forced. Note this also breaks any chance of pg_upgrade from 7.1, unless we hack up pg_upgrade to drop and recreate sequences. (Which is not out of the question, but I don't wanna do it.)
* This patch fixes the well-known but unfixed bug that fetchone() always returnsBruce Momjian2001-08-16
| | | | | | | the first result in the DB-API compliant wrapper. It turned out that the bug was way down in the C code. Gerhard Häring
* Remove protocol version change. Try MD5 first, then crypt() on all clients.Bruce Momjian2001-08-16
|
* Move md5.h contents to crypt.h.Bruce Momjian2001-08-15
|
* Use MD5 for wire protocol encryption for >= 7.2 client/server.Bruce Momjian2001-08-15
| | | | | | | Allow pg_shadow to be MD5 encrypted. Add ENCRYPTED/UNENCRYPTED option to CREATE/ALTER user. Add password_encryption postgresql.conf option. Update wire protocol version to 2.1.
* Clean up some warnings and bugs and make things build easier.Peter Eisentraut2001-08-11
|
* Since PQoidStatus is deprecated, we should probably stop using it inTom Lane2001-08-10
| | | | our own code ...
* Make OIDs optional, per discussions in pghackers. WITH OIDS is still theTom Lane2001-08-10
| | | | | | | | | | | | default, but OIDS are removed from many system catalogs that don't need them. Some interesting side effects: TOAST pointers are 20 bytes not 32 now; pg_description has a three-column key instead of one. Bugs fixed in passing: BINARY cursors work again; pg_class.relhaspkey has some usefulness; pg_dump dumps comments on indexes, rules, and triggers in a valid order. initdb forced.
* Attached is a patch to remove some redundant code in the JDBC driver.Bruce Momjian2001-08-10
| | | | | | | | | | | * Merges identical code from org.postgresql.jdbc[1|2].Statement into org.postgresql.Statement. * Moves escapeSQL() method from Connection to Statement (the only place it's used) * Minor cleanup of the new isolation level stuff. * Minor cleanup of version string handling. Anders Bengtsson
* Patch to LOCK multiple tables in one LOCK command.Bruce Momjian2001-08-10
| | | | Neil Padgett
* Add new files for the preparation.Hiroshi Inoue2001-08-10
|
* I think you replaced too many things with put(...Bruce Momjian2001-08-07
| | | | | | | | | | | | | Here is a context diff from latest cvs And I see why you couldn't apply the last diff, the setCatalog diff has been backed out, that was causing the compile problem in the first place. This following one needs to be applied to allow the current cvs to compile Dave Cramer
* Russian translation by Serguei MokhovPeter Eisentraut2001-08-07
|
* Back out LOCK A,B,C patch at Tom's suggestion.Bruce Momjian2001-08-04
|
* Compile fix for jdbc1.Bruce Momjian2001-08-04
|
* Add LOCK A,B,C functionality as LOCK A;LOCK B;LOCK C; as agreed.Bruce Momjian2001-08-04
| | | | Neil Padgett
* > 1) When a row is retrieved, and then a SQL_FETCH_FIRST is issued, theBruce Momjian2001-08-04
| | | | | | | | | | | | check > in convert.c > does not consider the fact that the value in the field has been altered to > be a '1' if the > backend handed it a 't'. The net result being that the first row on any > subsequent queries > has all it's boolean set to 0. Aidan Mountford
* Attached is a patch that does the following:Bruce Momjian2001-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) improves performance of commit/rollback by reducing number of round trips to the server 2) uses 7.1 functionality for setting the transaction isolation level 3) backs out a patch from 11 days ago because that code failed to compile under jdk1.1 Details: 1) The old code was doing the following for each commit: commit begin set transaction isolation level xxx thus a call to commit was performing three round trips to the database. The new code does this in one round trip as: commit; begin; set transaction isolation level xxx In a simple test program that performs 1000 transactions (where each transaction does one simple select inside that transaction) has the following before and after timings: Client and Server on same machine old new --- --- 1.877sec 1.405sec 25.1% improvement Client and Server on different machines old new --- --- 4.184sec 2.927sec 34.3% improvement (all timings are an average of four different runs) 2) The driver was using 'set transaction isolation level xxx' at the begining of each transaction, instead of using the new 7.1 syntax of 'set session characteristics as transaction isolation level xxx' which only needs to be done once instead of for each transaction. This is done conditionally (i.e. if server is 7.0 or older do the old behaviour, else do the new behaviour) to not break backward compatibility. This also required the movement of some code to check/test database version numbers from the DatabaseMetaData object to the Connection object. 3) Finally while testing, I discovered that the code that was checked in 11 days ago actually didn't compile. The code in the patch for Connection.setCatalog() used Properties.setProperty() which only exists in JDK1.2 or higher. Thus compiling the JDBC1 driver failed as this method doesn't exist. Thus I backed out that patch. Barry Lind
* Fix residual breakage from Windows socket-errno patch: the routinesTom Lane2001-08-03
| | | | that should use regular errno, not WSAGetLastError(), now do so again.
* Fix win32.mak to support MULTIBYTE build --- it was pulling in severalTom Lane2001-08-03
| | | | | backend files that it shouldn't anymore, causing compile failures. Per report from Darko Prenosil.
* Message typo was fixed in sources, but not in de.po.Tom Lane2001-08-01
|
* Remove WIN32_NON_BLOCKING_CONNECTIONS tests, since we don't need 'emTom Lane2001-07-31
| | | | anymore.
* This patch merges the identical methods from the JDBC1 and JDBC2Bruce Momjian2001-07-30
| | | | | | | | | | | | connection implementations (org.postgresql.jdbc[1|2].Connection) into their superclass (org.postgresql.Connection). It also changes the close() methods of Connection and PG_Stream, so that PG_Stream no longer is responsible for sending the termination packet 'X' to the backend. I figured that protocol-level stuff like that belonged in Connection more than in PG_Stream. Anders Bengtsson
* Move EncodingTest.java file.Bruce Momjian2001-07-21
|
* DatabaseMetaData.getColumns() doesn't appear to get the defaultBruce Momjian2001-07-21
| | | | | | | value for each column. Here is a context diff of CVS which should fix it. Jason Davies
* Great, here is a context diff of CVS for implementing the get/setCatalog methodsBruce Momjian2001-07-21
| | | | | | | in Connection - note: I've updated setCatalog(String catalog) from my previous diff so it checks whether it is already connected to the specified catalog. Jason Davies
* JDBC encoding additions.Bruce Momjian2001-07-21
| | | | | | | Here's a patch against the current CVS. The changes from the previous patch are mostly related to the changed interface for PG_Stream. Anders Bengtsson
* I downloaded new source for lib (only few hours old !!!), and madeBruce Momjian2001-07-21
| | | | | | | | | | changes on this new source to make non-blocking connection work. I tested it, and PQSendQuery and PQGetResult are working fine. In win32.h I added one line: #define snprintf _snprintf Darko Prenosil
* i've spotted a following problem using DBD::Pg under win32. winsockBruce Momjian2001-07-20
| | | | | | | | | functions do not set errno, so some normal conditions are treated as fatal errors. e.g. fetching large tuples fails, as at some point recv() returns EWOULDBLOCK. here's a patch, which replaces errno with WSAGetLastError(). i've tried to to affect non-win32 code. Dmitry Yurtaev
* Fix fault in message.Peter Eisentraut2001-07-16
|