Thread: 7.4x vs 8.1x
I note that there are a lot of 'format' related changes from pre 8.1 to 8.1. Could someone inform me whether a 7.4.x JDBC driver will operate at all with a 8.1.x database? Thanks in advance, Donald Fraser
We certainly don't test it for that, why would you want to do this ? You can use protocol version 2 and you shouldn't notice any (much) difference. Dave On 10-Jan-06, at 8:29 AM, Donald Fraser wrote: > I note that there are a lot of 'format' related changes from pre > 8.1 to 8.1. > Could someone inform me whether a 7.4.x JDBC driver will operate at > all with > a 8.1.x database? > > Thanks in advance, > Donald Fraser > > > ---------------------------(end of > broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster >
Hi, Dave, Dave Cramer wrote: > We certainly don't test it for that, why would you want to do this ? Maybe he has a userbase with 7.4 drivers deployed, and wants to upgrade the server without upgrading all the clients at the same time. > You can use protocol version 2 and you shouldn't notice any (much) > difference. Did the V3 protocol change between 7.4 and 8.1? But, at least, the opposite (using 8.1 drivers against 7.4 databases) seems to work in our deployments. Schabi -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org
----- Original Message ----- From: "Dave Cramer" To: "Donald Fraser" > We certainly don't test it for that, why would you want to do this ? There are two main reasons for this: First we have a patched version which has the following changes: 1) Java style notifications for NOTIFY messages from the server. No polling involved. 2) Sub-classed the Java sql timestamp and sql date objects to support the postgresql infinity implementation. 3) SSL modification - allows SSL to use a client supplied certificate. 4) HTML formated error messages, turned on or off with a URL switch. 5) Ability to set the encoding used by the driver - not everyone wants to use UNICODE. I note that most of these things have been addressed but we would have to do a lot of testing to make sure everything worked. My normal approach to such things is thus: "if it isn't broken don't fix it"! We know our version of the driver works ok and therefore we wouldn't need to test it specifically... I also note that someone is attempting to implement notifications but it should be noted that the method they are attempting to use will fail! (http://archives.postgresql.org/pgsql-jdbc/2005-04/msg00056.php) The reason it will fail is that the available() method of the input stream does not work on SSL sockets! We originally implemented something similiar to this as it was the least amount of code base to hack, but when we started using SSL it stopped working. The reason is the available() method is not implemented on Sun's implementation of the SSL socket stream(it always returns a value of 0) - this was tested on the 1.4 micro version of the JVM. I logged this as a bug with Sun and they replyed that it was ment to be that way! Hence we had to take a more drastic approach and dig into another level of the code base and use the socket stream directly to achieve what turned out to be a better implementation - a non-polling notification system. I only just found the above link - so hopefully those concerned with this code in the latest release of the driver will read the above and take note! The second reason is that we have a lot of clients with the 7.4 driver and I don't want to have to force them to upgrade their software... The notification side of things is the only part that I see taking a lot of work to patch against the newer drivers as I noted there were some major changes to the code base between 7.4 and 8.0. In March this year I will have some time up my sleave and so I may take the leap forward and attempt to patch our code and if you're interested I'll pass it on. Regards Donald Fraser > You can use protocol version 2 and you shouldn't notice any (much) > difference. > > Dave > On 10-Jan-06, at 8:29 AM, Donald Fraser wrote: > > > I note that there are a lot of 'format' related changes from pre > > 8.1 to 8.1. > > Could someone inform me whether a 7.4.x JDBC driver will operate at > > all with > > a 8.1.x database? > > > > Thanks in advance, > > Donald Fraser
Donald Fraser wrote: > I note that there are a lot of 'format' related changes from pre 8.1 to 8.1. > Could someone inform me whether a 7.4.x JDBC driver will operate at all with > a 8.1.x database? We do not test or support this. It may work, but you're on your own. Basic query execution is probably OK, but things like database metadata are likely to break. > I also note that someone is attempting to implement notifications but it > should be noted that the method they are attempting to use will fail! > (http://archives.postgresql.org/pgsql-jdbc/2005-04/msg00056.php) The reason > it will fail is that the available() method of the input stream does not > work on SSL sockets! This is a known limitation of the code in the current driver. With a SSL connection, the driver will not fail, it is just that applications will still need to run queries before you see notifications arrive, i.e. the old behaviour. -O
I have 7.4.x JDBC clients talking to 8.1. Works fine. I haven't upgraded the client-side driver because when I last checked, there was still no good way to set an array--that is, float[]--from 8.x client code because of strong typing. I haven't kept up with this list, so this may have changed. Donald Fraser wrote: >I note that there are a lot of 'format' related changes from pre 8.1 to 8.1. >Could someone inform me whether a 7.4.x JDBC driver will operate at all with > >