Re: Strange behaviour of JDBC driver for PostgreSQL

Lists: pgsql-jdbc
From: Carlos Correia <carlos(at)m16e(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Strange behaviour of JDBC driver for PostgreSQL
Date: 2002-12-17 17:54:07
Message-ID: 3DFF64BF.8080603@m16e.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc


I have problems with PostgreSQL when connecting from another machine in
the same network, after upgrading to 7.2.2 (Mandrake 9.0).

When invoking 'getColumns()' on a DatabaseMetaData object I get (very)
different results when I invoke it in the local machine (in which works
good) then when I invoke it in another machine in the network as you can
see below:

I've made a small Java class to reproduce its bizarre behaviour (I'm
using the same driver in both machines -
/usr/share/pgsql/jdbc7.2dev-1.2.jar from Mandrake 9.0), here is its output:

==================================
LOCAL MACHINE:
Database: PostgreSQL
Version : 7.2.2

schemas:

catalogs:
template1
template0
sedb

Fields for table: 'test'
ID TYPE TYPNAME NAME LEN NULLABLE
1 4 int4 4 NO
2 1 bpchar 20 YES

===================================
REMOTE MACHINE IN THE SAME NETWORK:
Database: PostgreSQL
Version : 6.5.2

schemas:

catalogs:

Fields for table: 'test'
ID TYPE TYPNAME NAME LEN NULLABLE
ERROR: No such attribute or function 'oid'

java.sql.SQLException: ERROR: No such attribute or function 'oid'

org.postgresql.Connection.ExecSQL(Connection.java at :393)
org.postgresql.jdbc2.DatabaseMetaData.getColumns( at DatabaseMetaData.jav
a:1880)
at DbTester.(DbTester.java:41)
at DbTester.main(DbTester.java:115)

================================
LAST LINES OF '/var/lib/pgsql/data/pg_hba.conf':
local all ident sameuser
host all 192.168.1.2 255.255.255.0 trust

191.168.1.2 is the client machine, running the same version of JDK (1.4.0).

Here is the test program that illustrates this behaviour:

import java.util.*;
import java.text.*;
import java.io.*;

import java.sql.*;

///////////////////////////////////////////////// ///////////
public class DbTester
{
Connection connection = null;
DatabaseMetaData dbmd = null;

//////////////////////////////////////////////// ////////////
public DbTester()
throws SQLException, ClassNotFoundException,
FileNotFoundException, IOException
{
Class.forName( "org.postgresql.Driver" );
Connection connection =
DriverManager.getConnection(
"jdbc:postgresql://devo/sedb", "carlos", "" );
dbmd = connection.getMetaData();
String databaseProductName = dbmd.getDatabaseProductName();
String databaseProductVersion = dbmd.getDatabaseProductVersion();

System.out.println(
"Database: " databaseProductName
"nVersion : " databaseProductVersion );

printSchemas();
printCatalogs();
System.out.println(
"nFields for table: 'test'"
"nIDtTYPEtTYPNAMEtNAMEtLENtNULLABLE" );
ResultSet rs = dbmd.getColumns( "%", "%", "test", "%" );
while( rs.next() )
printField( rs );
rs.close();
}

//////////////////////////////////////////////// ////////////
public void printField( ResultSet rs )
throws SQLException
{
System.out.println(
rs.getInt( 17 ) "t" rs.getInt( 5 ) "t"
rs.getString( 6 ) "t" rs.getInt( 7 ) "t"
rs.getString( 18 ) );
}

//////////////////////////////////////////////// ////////////
public void printSchemas()
throws SQLException
{
System.out.println( "nn schemas:" );
ResultSet rs = dbmd.getSchemas();
while ( rs.next() )
System.out.println( rs.getString( 1 ) );
rs.close();
}

//////////////////////////////////////////////// ////////////
public void printCatalogs()
throws SQLException
{
System.out.println( "nn catalogs:" );
ResultSet rs = dbmd.getCatalogs();
while ( rs.next() )
System.out.println( rs.getString( 1 ) );
rs.close();
}

//////////////////////////////////////////////// ////////////
public static void main( String[] args )
{
try
{
new DbTester();
}
catch( Exception e )
{
System.out.println( e.getMessage() );
e.printStackTrace();
}
}

}

best Regards,

Carlos Correia


From: Dave Cramer <Dave(at)micro-automation(dot)net>
To: Carlos Correia <carlos(at)m16e(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Strange behaviour of JDBC driver for PostgreSQL
Date: 2002-12-17 19:42:47
Message-ID: 1040154167.14875.281.camel@inspiron.cramers
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Carlos,

Sorry, I didn't read your email carefully enough. The driver won't work
with a 6.5.2 database, my apologies. You will need to upgrade the remote
server

Dave

On Tue, 2002-12-17 at 12:54, Carlos Correia wrote:
> I have problems with PostgreSQL when connecting from another machine in
> the same network, after upgrading to 7.2.2 (Mandrake 9.0).
>
> When invoking 'getColumns()' on a DatabaseMetaData object I get (very)
> different results when I invoke it in the local machine (in which works
> good) then when I invoke it in another machine in the network as you can
> see below:
>
> I've made a small Java class to reproduce its bizarre behaviour (I'm
> using the same driver in both machines -
> /usr/share/pgsql/jdbc7.2dev-1.2.jar from Mandrake 9.0), here is its output:
>
>
> ==================================
> LOCAL MACHINE:
> Database: PostgreSQL
> Version: 7.2.2
>
>
> schemas:
>
>
> catalogs:
> template1
> template0
> sedb
>
> Fields for table: 'test'
> ID TYPE TYPNAME NAME LEN NULLABLE
> 1 4 int4 4 NO
> 2 1 bpchar 20 YES
>
> ===================================
> REMOTE MACHINE IN THE SAME NETWORK:
> Database: PostgreSQL
> Version: 6.5.2
>
>
> schemas:
>
>
>
> catalogs:
>
>
> Fields for table: 'test'
> ID TYPE TYPNAME NAME LEN NULLABLE
> ERROR: No such attribute or function 'oid'
>
>
> java.sql.SQLException: ERROR: No such attribute or function 'oid'
>
> org.postgresql.Connection.ExecSQL(Connection.java at :393)
> org.postgresql.jdbc2.DatabaseMetaData.getColumns( at DatabaseMetaData.jav
> a:1880)
> at DbTester.(DbTester.java:41)
> at DbTester.main(DbTester.java:115)
>
> ================================
> LAST LINES OF '/var/lib/pgsql/data/pg_hba.conf':
> local all ident sameuser
> host all 192.168.1.2 255.255.255.0 trust
>
> 191.168.1.2 is the client machine, running the same version of JDK (1.4.0).
>
> Here is the test program that illustrates this behaviour:
>
> import java.util.*;
> import java.text.*;
> import java.io.*;
>
> import java.sql.*;
>
> ///////////////////////////////////////////////// ///////////
> public class DbTester
> {
> Connection connection = null;
> DatabaseMetaData dbmd = null;
>
> //////////////////////////////////////////////// ////////////
> public DbTester()
> throws SQLException, ClassNotFoundException,
> FileNotFoundException, IOException
> {
> Class.forName( "org.postgresql.Driver" );
> Connection connection =
> DriverManager.getConnection(
> "jdbc:postgresql://devo/sedb", "carlos", "" );
> dbmd = connection.getMetaData();
> String databaseProductName = dbmd.getDatabaseProductName();
> String databaseProductVersion = dbmd.getDatabaseProductVersion();
>
> System.out.println(
> "Database: " databaseProductName
> "nVersion: " databaseProductVersion );
>
> printSchemas();
> printCatalogs();
> System.out.println(
> "nFields for table: 'test'"
> "nIDtTYPEtTYPNAMEtNAMEtLENtNULLABLE" );
> ResultSet rs = dbmd.getColumns( "%", "%", "test", "%" );
> while( rs.next() )
> printField( rs );
> rs.close();
> }
>
>
> //////////////////////////////////////////////// ////////////
> public void printField( ResultSet rs )
> throws SQLException
> {
> System.out.println(
> rs.getInt( 17 ) "t" rs.getInt( 5 ) "t"
> rs.getString( 6 ) "t" rs.getInt( 7 ) "t"
> rs.getString( 18 ) );
> }
>
> //////////////////////////////////////////////// ////////////
> public void printSchemas()
> throws SQLException
> {
> System.out.println( "nn schemas:" );
> ResultSet rs = dbmd.getSchemas();
> while ( rs.next() )
> System.out.println( rs.getString( 1 ) );
> rs.close();
> }
>
> //////////////////////////////////////////////// ////////////
> public void printCatalogs()
> throws SQLException
> {
> System.out.println( "nn catalogs:" );
> ResultSet rs = dbmd.getCatalogs();
> while ( rs.next() )
> System.out.println( rs.getString( 1 ) );
> rs.close();
> }
>
> //////////////////////////////////////////////// ////////////
> public static void main( String[] args )
> {
> try
> {
> new DbTester();
> }
> catch( Exception e )
> {
> System.out.println( e.getMessage() );
> e.printStackTrace();
> }
> }
>
> }
>
> best Regards,
>
> Carlos Correia
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
--
Dave Cramer <Dave(at)micro-automation(dot)net>


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Carlos Correia <carlos(at)m16e(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Strange behaviour of JDBC driver for PostgreSQL
Date: 2002-12-17 19:49:14
Message-ID: 10405.1040154554@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Carlos Correia <carlos(at)m16e(dot)com> writes:
> REMOTE MACHINE IN THE SAME NETWORK:
> Database: PostgreSQL
> Version : 6.5.2

Try updating. I don't think JDBC claims to support such an ancient
server version as that. Considering the many known bugs and performance
problems in 6.5.*, it's hardly worth your time to look for a
compatibility workaround ...

regards, tom lane


From: Carlos Correia <carlos(at)m16e(dot)com>
To: Dave Cramer <Dave(at)micro-automation(dot)net>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Strange behaviour of JDBC driver for PostgreSQL
Date: 2002-12-17 19:50:59
Message-ID: 3DFF8023.7010403@m16e.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Dave Cramer wrote:

>Carlos,
>
>Sorry, I didn't read your email carefully enough. The driver won't work
>with a 6.5.2 database, my apologies. You will need to upgrade the remote
>server
>
>Dave
>
>On Tue, 2002-12-17 at 12:54, Carlos Correia wrote:
>
>
>>I have problems with PostgreSQL when connecting from another machine in
>>the same network, after upgrading to 7.2.2 (Mandrake 9.0).
>>
>>When invoking 'getColumns()' on a DatabaseMetaData object I get (very)
>>different results when I invoke it in the local machine (in which works
>>good) then when I invoke it in another machine in the network as you can
>>see below:
>>
>>I've made a small Java class to reproduce its bizarre behaviour (I'm
>>using the same driver in both machines -
>>/usr/share/pgsql/jdbc7.2dev-1.2.jar from Mandrake 9.0), here is its output:
>>
>>
>>==================================
>>LOCAL MACHINE:
>>Database: PostgreSQL
>>Version: 7.2.2
>>
>>
>>schemas:
>>
>>
>>catalogs:
>>template1
>>template0
>>sedb
>>
>>Fields for table: 'test'
>>ID TYPE TYPNAME NAME LEN NULLABLE
>>1 4 int4 4 NO
>>2 1 bpchar 20 YES
>>
>>===================================
>>REMOTE MACHINE IN THE SAME NETWORK:
>>Database: PostgreSQL
>>Version: 6.5.2
>>
>>
>>schemas:
>>
>>
>>
>>catalogs:
>>
>>
>>Fields for table: 'test'
>>ID TYPE TYPNAME NAME LEN NULLABLE
>>ERROR: No such attribute or function 'oid'
>>
>>
>>java.sql.SQLException: ERROR: No such attribute or function 'oid'
>>
>>org.postgresql.Connection.ExecSQL(Connection.java at :393)
>>org.postgresql.jdbc2.DatabaseMetaData.getColumns( at DatabaseMetaData.jav
>>a:1880)
>>at DbTester.(DbTester.java:41)
>>at DbTester.main(DbTester.java:115)
>>
>>================================
>>LAST LINES OF '/var/lib/pgsql/data/pg_hba.conf':
>>local all ident sameuser
>>host all 192.168.1.2 255.255.255.0 trust
>>
>>191.168.1.2 is the client machine, running the same version of JDK (1.4.0).
>>
>>Here is the test program that illustrates this behaviour:
>>
>>import java.util.*;
>>import java.text.*;
>>import java.io.*;
>>
>>import java.sql.*;
>>
>>///////////////////////////////////////////////// ///////////
>>public class DbTester
>>{
>>Connection connection = null;
>>DatabaseMetaData dbmd = null;
>>
>>//////////////////////////////////////////////// ////////////
>>public DbTester()
>>throws SQLException, ClassNotFoundException,
>>FileNotFoundException, IOException
>>{
>>Class.forName( "org.postgresql.Driver" );
>>Connection connection =
>>DriverManager.getConnection(
>>"jdbc:postgresql://devo/sedb", "carlos", "" );
>>dbmd = connection.getMetaData();
>>String databaseProductName = dbmd.getDatabaseProductName();
>>String databaseProductVersion = dbmd.getDatabaseProductVersion();
>>
>>System.out.println(
>>"Database: " databaseProductName
>>"nVersion: " databaseProductVersion );
>>
>>printSchemas();
>>printCatalogs();
>>System.out.println(
>>"nFields for table: 'test'"
>>"nIDtTYPEtTYPNAMEtNAMEtLENtNULLABLE" );
>>ResultSet rs = dbmd.getColumns( "%", "%", "test", "%" );
>>while( rs.next() )
>>printField( rs );
>>rs.close();
>>}
>>
>>
>>//////////////////////////////////////////////// ////////////
>>public void printField( ResultSet rs )
>>throws SQLException
>>{
>>System.out.println(
>>rs.getInt( 17 ) "t" rs.getInt( 5 ) "t"
>>rs.getString( 6 ) "t" rs.getInt( 7 ) "t"
>>rs.getString( 18 ) );
>>}
>>
>>//////////////////////////////////////////////// ////////////
>>public void printSchemas()
>>throws SQLException
>>{
>>System.out.println( "nn schemas:" );
>>ResultSet rs = dbmd.getSchemas();
>>while ( rs.next() )
>>System.out.println( rs.getString( 1 ) );
>>rs.close();
>>}
>>
>>//////////////////////////////////////////////// ////////////
>>public void printCatalogs()
>>throws SQLException
>>{
>>System.out.println( "nn catalogs:" );
>>ResultSet rs = dbmd.getCatalogs();
>>while ( rs.next() )
>>System.out.println( rs.getString( 1 ) );
>>rs.close();
>>}
>>
>>//////////////////////////////////////////////// ////////////
>>public static void main( String[] args )
>>{
>>try
>>{
>>new DbTester();
>>}
>>catch( Exception e )
>>{
>>System.out.println( e.getMessage() );
>>e.printStackTrace();
>>}
>>}
>>
>>}
>>
>>best Regards,
>>
>>Carlos Correia
>>
>>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 3: if posting/reading through Usenet, please send an appropriate
>>subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>>message can get through to the mailing list cleanly
>>
>>
The information that is correct is the one from the localhost (version
7.2.2)
I've never used such a version (6.x.x).

I've downloaded the 7.3 driver (pg73jdbc3.jar) and... It happened the
same (even with the same line numbers in the SQLException's stack
trace). I'm sure I made no mistake!
Note: I'm also sure there are no more Postgres installations in the
network.

Carlos Correia


From: Daniel Serodio <daniel(at)checkforte(dot)com(dot)br>
To: PostgreSQL JDBC List <pgsql-jdbc(at)postgresql(dot)org>
Cc: Carlos Correia <carlos(at)m16e(dot)com>
Subject: Re: Strange behaviour of JDBC driver for PostgreSQL
Date: 2002-12-17 20:13:44
Message-ID: 1040156028.26502.42.camel@kelly
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Try issuing a "SELECT VERSION()" on the DB that
DatabaseMetaData.getDatabaseProductVersion reports as being 6.5.2, and
see what gives.

On Tue, 2002-12-17 at 17:50, Carlos Correia wrote:
> Dave Cramer wrote:
>
> >Carlos,
> >
> >Sorry, I didn't read your email carefully enough. The driver won't work
> >with a 6.5.2 database, my apologies. You will need to upgrade the remote
> >server
> >
> >Dave
> >
> >On Tue, 2002-12-17 at 12:54, Carlos Correia wrote:
> >
> >
> >>I have problems with PostgreSQL when connecting from another machine in
> >>the same network, after upgrading to 7.2.2 (Mandrake 9.0).
> >>
> >>When invoking 'getColumns()' on a DatabaseMetaData object I get (very)
> >>different results when I invoke it in the local machine (in which works
> >>good) then when I invoke it in another machine in the network as you can
> >>see below:
> >>
> >>I've made a small Java class to reproduce its bizarre behaviour (I'm
> >>using the same driver in both machines -
> >>/usr/share/pgsql/jdbc7.2dev-1.2.jar from Mandrake 9.0), here is its output:
> >>
> >>

<snip>

> >>
> >>
> The information that is correct is the one from the localhost (version
> 7.2.2)
> I've never used such a version (6.x.x).
>
> I've downloaded the 7.3 driver (pg73jdbc3.jar) and... It happened the
> same (even with the same line numbers in the SQLException's stack
> trace). I'm sure I made no mistake!
> Note: I'm also sure there are no more Postgres installations in the
> network.
>
> Carlos Correia

--
[]'s
Daniel Serodio


From: Carlos Correia <carlos(at)m16e(dot)com>
To: Dave Cramer <Dave(at)micro-automation(dot)net>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Strange behaviour of JDBC driver for PostgreSQL
Date: 2002-12-18 13:23:15
Message-ID: 3E0076C3.7000500@m16e.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

The information that is correct is the one from the localhost (version
7.2.2)
I've never used such a version (6.x.x).

I've downloaded the 7.3 driver (pg73jdbc3.jar) and... It happened the
same (even with the same line numbers in the SQLException's stack
trace). I'm sure I made no mistake!
Note: I'm also sure there are no more Postgres installations in the
network.

Carlos Correia

> Dave Cramer wrote:
>
>> Carlos,
>>
>> Sorry, I didn't read your email carefully enough. The driver won't work
>> with a 6.5.2 database, my apologies. You will need to upgrade the remote
>> server
>>
>> Dave
>>
>> On Tue, 2002-12-17 at 12:54, Carlos Correia wrote:
>>
>>
>>> I have problems with PostgreSQL when connecting from another machine in
>>> the same network, after upgrading to 7.2.2 (Mandrake 9.0).
>>>
>>> When invoking 'getColumns()' on a DatabaseMetaData object I get (very)
>>> different results when I invoke it in the local machine (in which works
>>> good) then when I invoke it in another machine in the network as you can
>>> see below:
>>>
>>> I've made a small Java class to reproduce its bizarre behaviour (I'm
>>> using the same driver in both machines -
>>> /usr/share/pgsql/jdbc7.2dev-1.2.jar from Mandrake 9.0), here is its
>>> output:
>>>
>>>
>>> ==================================
>>> LOCAL MACHINE:
>>> Database: PostgreSQL
>>> Version: 7.2.2
>>>
>>>
>>> schemas:
>>>
>>>
>>> catalogs:
>>> template1
>>> template0
>>> sedb
>>>
>>> Fields for table: 'test'
>>> ID TYPE TYPNAME NAME LEN NULLABLE
>>> 1 4 int4 4 NO
>>> 2 1 bpchar 20 YES
>>>
>>> ===================================
>>> REMOTE MACHINE IN THE SAME NETWORK:
>>> Database: PostgreSQL
>>> Version: 6.5.2
>>>
>>>
>>> schemas:
>>>
>>>
>>>
>>> catalogs:
>>>
>>>
>>> Fields for table: 'test'
>>> ID TYPE TYPNAME NAME LEN NULLABLE
>>> ERROR: No such attribute or function 'oid'
>>>
>>>
>>> java.sql.SQLException: ERROR: No such attribute or function 'oid'
>>>
>>> org.postgresql.Connection.ExecSQL(Connection.java at :393)
>>> org.postgresql.jdbc2.DatabaseMetaData.getColumns( at
>>> DatabaseMetaData.jav
>>> a:1880)
>>> at DbTester.(DbTester.java:41)
>>> at DbTester.main(DbTester.java:115)
>>>
>>> ================================
>>> LAST LINES OF '/var/lib/pgsql/data/pg_hba.conf':
>>> local all ident sameuser
>>> host all 192.168.1.2 255.255.255.0 trust
>>>
>>> 191.168.1.2 is the client machine, running the same version of JDK
>>> (1.4.0).
>>>
>>> Here is the test program that illustrates this behaviour:
>>>
>>> import java.util.*;
>>> import java.text.*;
>>> import java.io.*;
>>>
>>> import java.sql.*;
>>>
>>> ///////////////////////////////////////////////// ///////////
>>> public class DbTester
>>> {
>>> Connection connection = null;
>>> DatabaseMetaData dbmd = null;
>>>
>>> //////////////////////////////////////////////// ////////////
>>> public DbTester()
>>> throws SQLException, ClassNotFoundException,
>>> FileNotFoundException, IOException
>>> {
>>> Class.forName( "org.postgresql.Driver" );
>>> Connection connection =
>>> DriverManager.getConnection(
>>> "jdbc:postgresql://devo/sedb", "carlos", "" );
>>> dbmd = connection.getMetaData();
>>> String databaseProductName = dbmd.getDatabaseProductName();
>>> String databaseProductVersion = dbmd.getDatabaseProductVersion();
>>>
>>> System.out.println(
>>> "Database: " databaseProductName
>>> "nVersion: " databaseProductVersion );
>>>
>>> printSchemas();
>>> printCatalogs();
>>> System.out.println(
>>> "nFields for table: 'test'"
>>> "nIDtTYPEtTYPNAMEtNAMEtLENtNULLABLE" );
>>> ResultSet rs = dbmd.getColumns( "%", "%", "test", "%" );
>>> while( rs.next() )
>>> printField( rs );
>>> rs.close();
>>> }
>>>
>>>
>>> //////////////////////////////////////////////// ////////////
>>> public void printField( ResultSet rs )
>>> throws SQLException
>>> {
>>> System.out.println(
>>> rs.getInt( 17 ) "t" rs.getInt( 5 ) "t"
>>> rs.getString( 6 ) "t" rs.getInt( 7 ) "t"
>>> rs.getString( 18 ) );
>>> }
>>>
>>> //////////////////////////////////////////////// ////////////
>>> public void printSchemas()
>>> throws SQLException
>>> {
>>> System.out.println( "nn schemas:" );
>>> ResultSet rs = dbmd.getSchemas();
>>> while ( rs.next() )
>>> System.out.println( rs.getString( 1 ) );
>>> rs.close();
>>> }
>>>
>>> //////////////////////////////////////////////// ////////////
>>> public void printCatalogs()
>>> throws SQLException
>>> {
>>> System.out.println( "nn catalogs:" );
>>> ResultSet rs = dbmd.getCatalogs();
>>> while ( rs.next() )
>>> System.out.println( rs.getString( 1 ) );
>>> rs.close();
>>> }
>>>
>>> //////////////////////////////////////////////// ////////////
>>> public static void main( String[] args )
>>> {
>>> try
>>> {
>>> new DbTester();
>>> }
>>> catch( Exception e )
>>> {
>>> System.out.println( e.getMessage() );
>>> e.printStackTrace();
>>> }
>>> }
>>>
>>> }
>>>
>>> best Regards,
>>>
>>> Carlos Correia
>>>
>>>
>>>
>>> ---------------------------(end of broadcast)---------------------------
>>> TIP 3: if posting/reading through Usenet, please send an appropriate
>>> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>>> message can get through to the mailing list cleanly
>>>
>>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>


From: Carlos Correia <carlos(at)m16e(dot)com>
To: Dave Cramer <Dave(at)micro-automation(dot)net>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Strange behaviour of JDBC driver for PostgreSQL
Date: 2002-12-18 14:56:07
Message-ID: 3E008C87.90506@m16e.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc


Dave Cramer wrote:

>Carlos,
>
>Is this a new message today, or one from yesterday?
>
>
Dave,

It is the same messge, but as I think that everyone is misunderstooding
the problem, I'll try to resume it:

1. I don't know why the driver reports version 6.5.2, as I don't have
such a version.
2. The only installation I have is of version 7.2.2 (at least that's
what the output of 'select version()' says).
3. The problem: when I run the program on another machine of the same
network, it has this strange behaviour (reporting version 6.5.2 and
crashing when I invoke 'getColumns()' on DatabaseMetaData object).

Carlos Correia

>>>>>==================================
>>>>>LOCAL MACHINE:
>>>>>Database: PostgreSQL
>>>>>Version: 7.2.2
>>>>>
>>>>>
>>>>>schemas:
>>>>>
>>>>>
>>>>>catalogs:
>>>>>template1
>>>>>template0
>>>>>sedb
>>>>>
>>>>>Fields for table: 'test'
>>>>>ID TYPE TYPNAME NAME LEN NULLABLE
>>>>>1 4 int4 4 NO
>>>>>2 1 bpchar 20 YES
>>>>>
>>>>>===================================
>>>>>REMOTE MACHINE IN THE SAME NETWORK:
>>>>>Database: PostgreSQL
>>>>>Version: 6.5.2
>>>>>
>>>>>
>>>>>schemas:
>>>>>
>>>>>
>>>>>
>>>>>catalogs:
>>>>>
>>>>>
>>>>>Fields for table: 'test'
>>>>>ID TYPE TYPNAME NAME LEN NULLABLE
>>>>>ERROR: No such attribute or function 'oid'
>>>>>
>>>>>
>>>>>java.sql.SQLException: ERROR: No such attribute or function 'oid'
>>>>>
>>>>>org.postgresql.Connection.ExecSQL(Connection.java at :393)
>>>>>org.postgresql.jdbc2.DatabaseMetaData.getColumns( at
>>>>>DatabaseMetaData.jav
>>>>>a:1880)
>>>>>at DbTester.(DbTester.java:41)
>>>>>at DbTester.main(DbTester.java:115)
>>>>>
>>>>>================================
>>>>>LAST LINES OF '/var/lib/pgsql/data/pg_hba.conf':
>>>>>local all ident sameuser
>>>>>host all 192.168.1.2 255.255.255.0 trust
>>>>>
>>>>>191.168.1.2 is the client machine, running the same version of JDK
>>>>>(1.4.0).
>>>>>
>>>>>Here is the test program that illustrates this behaviour:
>>>>>
>>>>>import java.util.*;
>>>>>import java.text.*;
>>>>>import java.io.*;
>>>>>
>>>>>import java.sql.*;
>>>>>
>>>>>///////////////////////////////////////////////// ///////////
>>>>>public class DbTester
>>>>>{
>>>>>Connection connection = null;
>>>>>DatabaseMetaData dbmd = null;
>>>>>
>>>>>//////////////////////////////////////////////// ////////////
>>>>>public DbTester()
>>>>>throws SQLException, ClassNotFoundException,
>>>>>FileNotFoundException, IOException
>>>>>{
>>>>>Class.forName( "org.postgresql.Driver" );
>>>>>Connection connection =
>>>>>DriverManager.getConnection(
>>>>>"jdbc:postgresql://devo/sedb", "carlos", "" );
>>>>>dbmd = connection.getMetaData();
>>>>>String databaseProductName = dbmd.getDatabaseProductName();
>>>>>String databaseProductVersion = dbmd.getDatabaseProductVersion();
>>>>>
>>>>>System.out.println(
>>>>>"Database: " databaseProductName
>>>>>"nVersion: " databaseProductVersion );
>>>>>
>>>>>printSchemas();
>>>>>printCatalogs();
>>>>>System.out.println(
>>>>>"nFields for table: 'test'"
>>>>>"nIDtTYPEtTYPNAMEtNAMEtLENtNULLABLE" );
>>>>>ResultSet rs = dbmd.getColumns( "%", "%", "test", "%" );
>>>>>while( rs.next() )
>>>>>printField( rs );
>>>>>rs.close();
>>>>>}
>>>>>
>>>>>
>>>>>//////////////////////////////////////////////// ////////////
>>>>>public void printField( ResultSet rs )
>>>>>throws SQLException
>>>>>{
>>>>>System.out.println(
>>>>>rs.getInt( 17 ) "t" rs.getInt( 5 ) "t"
>>>>>rs.getString( 6 ) "t" rs.getInt( 7 ) "t"
>>>>>rs.getString( 18 ) );
>>>>>}
>>>>>
>>>>>//////////////////////////////////////////////// ////////////
>>>>>public void printSchemas()
>>>>>throws SQLException
>>>>>{
>>>>>System.out.println( "nn schemas:" );
>>>>>ResultSet rs = dbmd.getSchemas();
>>>>>while ( rs.next() )
>>>>>System.out.println( rs.getString( 1 ) );
>>>>>rs.close();
>>>>>}
>>>>>
>>>>>//////////////////////////////////////////////// ////////////
>>>>>public void printCatalogs()
>>>>>throws SQLException
>>>>>{
>>>>>System.out.println( "nn catalogs:" );
>>>>>ResultSet rs = dbmd.getCatalogs();
>>>>>while ( rs.next() )
>>>>>System.out.println( rs.getString( 1 ) );
>>>>>rs.close();
>>>>>}
>>>>>
>>>>>//////////////////////////////////////////////// ////////////
>>>>>public static void main( String[] args )
>>>>>{
>>>>>try
>>>>>{
>>>>>new DbTester();
>>>>>}
>>>>>catch( Exception e )
>>>>>{
>>>>>System.out.println( e.getMessage() );
>>>>>e.printStackTrace();
>>>>>}
>>>>>}
>>>>>
>>>>>}
>>>>>
>>>>>best Regards,
>>>>>
>>>>>Carlos Correia
>>>>>
>>>>>
>>>>>
>>>>>


From: Fernando Nasser <fnasser(at)redhat(dot)com>
To: Carlos Correia <carlos(at)m16e(dot)com>
Cc: Dave Cramer <Dave(at)micro-automation(dot)net>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Strange behaviour of JDBC driver for PostgreSQL
Date: 2002-12-18 15:13:39
Message-ID: 3E0090A3.1060401@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Carlos Correia wrote:
> The information that is correct is the one from the localhost (version
> 7.2.2)
> I've never used such a version (6.x.x).
>

This lead us to believe you are using a server which is version 6.x.x...

>>>> REMOTE MACHINE IN THE SAME NETWORK:
>>>> Database: PostgreSQL
>>>> Version: 6.5.2

Regards,
Fernando

> I've downloaded the 7.3 driver (pg73jdbc3.jar) and... It happened the
> same (even with the same line numbers in the SQLException's stack
> trace). I'm sure I made no mistake!
> Note: I'm also sure there are no more Postgres installations in the
> network.
>
> Carlos Correia
>
>> Dave Cramer wrote:
>>
>>> Carlos,
>>>
>>> Sorry, I didn't read your email carefully enough. The driver won't work
>>> with a 6.5.2 database, my apologies. You will need to upgrade the remote
>>> server
>>>
>>> Dave
>>>
>>> On Tue, 2002-12-17 at 12:54, Carlos Correia wrote:
>>>
>>>
>>>> I have problems with PostgreSQL when connecting from another machine in
>>>> the same network, after upgrading to 7.2.2 (Mandrake 9.0).
>>>>
>>>> When invoking 'getColumns()' on a DatabaseMetaData object I get (very)
>>>> different results when I invoke it in the local machine (in which works
>>>> good) then when I invoke it in another machine in the network as you
>>>> can
>>>> see below:
>>>>
>>>> I've made a small Java class to reproduce its bizarre behaviour (I'm
>>>> using the same driver in both machines -
>>>> /usr/share/pgsql/jdbc7.2dev-1.2.jar from Mandrake 9.0), here is its
>>>> output:
>>>>
>>>>
>>>> ==================================
>>>> LOCAL MACHINE:
>>>> Database: PostgreSQL
>>>> Version: 7.2.2
>>>>
>>>>
>>>> schemas:
>>>>
>>>>
>>>> catalogs:
>>>> template1
>>>> template0
>>>> sedb
>>>>
>>>> Fields for table: 'test'
>>>> ID TYPE TYPNAME NAME LEN NULLABLE
>>>> 1 4 int4 4 NO
>>>> 2 1 bpchar 20 YES
>>>>
>>>> ===================================
>>>> REMOTE MACHINE IN THE SAME NETWORK:
>>>> Database: PostgreSQL
>>>> Version: 6.5.2
>>>>
>>>>
>>>> schemas:
>>>>
>>>>
>>>>
>>>> catalogs:
>>>>
>>>>
>>>> Fields for table: 'test'
>>>> ID TYPE TYPNAME NAME LEN NULLABLE
>>>> ERROR: No such attribute or function 'oid'
>>>>
>>>>
>>>> java.sql.SQLException: ERROR: No such attribute or function 'oid'
>>>>
>>>> org.postgresql.Connection.ExecSQL(Connection.java at :393)
>>>> org.postgresql.jdbc2.DatabaseMetaData.getColumns( at
>>>> DatabaseMetaData.jav
>>>> a:1880)
>>>> at DbTester.(DbTester.java:41)
>>>> at DbTester.main(DbTester.java:115)
>>>>
>>>> ================================
>>>> LAST LINES OF '/var/lib/pgsql/data/pg_hba.conf':
>>>> local all ident sameuser
>>>> host all 192.168.1.2 255.255.255.0 trust
>>>>
>>>> 191.168.1.2 is the client machine, running the same version of JDK
>>>> (1.4.0).
>>>>
>>>> Here is the test program that illustrates this behaviour:
>>>>
>>>> import java.util.*;
>>>> import java.text.*;
>>>> import java.io.*;
>>>>
>>>> import java.sql.*;
>>>>
>>>> ///////////////////////////////////////////////// ///////////
>>>> public class DbTester
>>>> {
>>>> Connection connection = null;
>>>> DatabaseMetaData dbmd = null;
>>>>
>>>> //////////////////////////////////////////////// ////////////
>>>> public DbTester()
>>>> throws SQLException, ClassNotFoundException,
>>>> FileNotFoundException, IOException
>>>> {
>>>> Class.forName( "org.postgresql.Driver" );
>>>> Connection connection =
>>>> DriverManager.getConnection(
>>>> "jdbc:postgresql://devo/sedb", "carlos", "" );
>>>> dbmd = connection.getMetaData();
>>>> String databaseProductName = dbmd.getDatabaseProductName();
>>>> String databaseProductVersion = dbmd.getDatabaseProductVersion();
>>>>
>>>> System.out.println(
>>>> "Database: " databaseProductName
>>>> "nVersion: " databaseProductVersion );
>>>>
>>>> printSchemas();
>>>> printCatalogs();
>>>> System.out.println(
>>>> "nFields for table: 'test'"
>>>> "nIDtTYPEtTYPNAMEtNAMEtLENtNULLABLE" );
>>>> ResultSet rs = dbmd.getColumns( "%", "%", "test", "%" );
>>>> while( rs.next() )
>>>> printField( rs );
>>>> rs.close();
>>>> }
>>>>
>>>>
>>>> //////////////////////////////////////////////// ////////////
>>>> public void printField( ResultSet rs )
>>>> throws SQLException
>>>> {
>>>> System.out.println(
>>>> rs.getInt( 17 ) "t" rs.getInt( 5 ) "t"
>>>> rs.getString( 6 ) "t" rs.getInt( 7 ) "t"
>>>> rs.getString( 18 ) );
>>>> }
>>>>
>>>> //////////////////////////////////////////////// ////////////
>>>> public void printSchemas()
>>>> throws SQLException
>>>> {
>>>> System.out.println( "nn schemas:" );
>>>> ResultSet rs = dbmd.getSchemas();
>>>> while ( rs.next() )
>>>> System.out.println( rs.getString( 1 ) );
>>>> rs.close();
>>>> }
>>>>
>>>> //////////////////////////////////////////////// ////////////
>>>> public void printCatalogs()
>>>> throws SQLException
>>>> {
>>>> System.out.println( "nn catalogs:" );
>>>> ResultSet rs = dbmd.getCatalogs();
>>>> while ( rs.next() )
>>>> System.out.println( rs.getString( 1 ) );
>>>> rs.close();
>>>> }
>>>>
>>>> //////////////////////////////////////////////// ////////////
>>>> public static void main( String[] args )
>>>> {
>>>> try
>>>> {
>>>> new DbTester();
>>>> }
>>>> catch( Exception e )
>>>> {
>>>> System.out.println( e.getMessage() );
>>>> e.printStackTrace();
>>>> }
>>>> }
>>>>
>>>> }
>>>>
>>>> best Regards,
>>>>
>>>> Carlos Correia
>>>>
>>>>
>>>>
>>>> ---------------------------(end of
>>>> broadcast)---------------------------
>>>> TIP 3: if posting/reading through Usenet, please send an appropriate
>>>> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>>>> message can get through to the mailing list cleanly
>>>>
>>>
>>>
>>
>>
>>
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser(at)redhat(dot)com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9


From: Fernando Nasser <fnasser(at)redhat(dot)com>
To: Carlos Correia <carlos(at)m16e(dot)com>
Cc: Dave Cramer <Dave(at)micro-automation(dot)net>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Strange behaviour of JDBC driver for PostgreSQL
Date: 2002-12-18 16:28:51
Message-ID: 3E00A243.40106@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Carlos Correia wrote:
>
> Dave Cramer wrote:
>
>> Carlos,
>>
>> Is this a new message today, or one from yesterday?
>>
>>
> Dave,
>
> It is the same messge, but as I think that everyone is misunderstooding
> the problem, I'll try to resume it:
>
> 1. I don't know why the driver reports version 6.5.2, as I don't have
> such a version.

The JDBC driver receives the version from the database backend when
connecting and that is what is printed by the
getDatabaseProductVersion() function. There is no way it can generate a
6.x.x version number by itself.

You _must_ be connecting to a 6.5.2 backend.

--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser(at)redhat(dot)com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9


From: Carlos Correia <carlos(at)m16e(dot)com>
To: Fernando Nasser <fnasser(at)redhat(dot)com>
Cc: Dave Cramer <Dave(at)micro-automation(dot)net>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Strange behaviour of JDBC driver for PostgreSQL
Date: 2002-12-18 17:55:29
Message-ID: 3E00B691.10401@m16e.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Fernando,

i am sure the db is version 7.2.2

Thanks anyway,

Carlos

Fernando Nasser wrote:

> Carlos Correia wrote:
>
>>
>> Dave Cramer wrote:
>>
>>> Carlos,
>>>
>>> Is this a new message today, or one from yesterday?
>>>
>>>
>> Dave,
>>
>> It is the same messge, but as I think that everyone is
>> misunderstooding the problem, I'll try to resume it:
>>
>> 1. I don't know why the driver reports version 6.5.2, as I don't have
>> such a version.
>
>
> The JDBC driver receives the version from the database backend when
> connecting and that is what is printed by the
> getDatabaseProductVersion() function. There is no way it can generate
> a 6.x.x version number by itself.
>
> You _must_ be connecting to a 6.5.2 backend.
>
>


From: Thomas O'Dowd <tom(at)nooper(dot)com>
To: Carlos Correia <carlos(at)m16e(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Strange behaviour of JDBC driver for PostgreSQL
Date: 2002-12-19 00:05:41
Message-ID: 1040256340.26880.483.camel@beast.uwillsee.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Carlos,

To satisfy everyones curiosity why don't you try sending us the output
of the following command from your local machine...

$ psql -h REMOTEHOSTNAME -U USERNAME -c 'SELECT version();' DBNAME

This will access the remote database DBNAME in much the same way as the
driver does.

Tom.

On Thu, 2002-12-19 at 02:55, Carlos Correia wrote:
> Fernando,
>
> i am sure the db is version 7.2.2
>
> Thanks anyway,
>
> Carlos
>
> Fernando Nasser wrote:
>
> > Carlos Correia wrote:
> >
> >>
> >> Dave Cramer wrote:
> >>
> >>> Carlos,
> >>>
> >>> Is this a new message today, or one from yesterday?
> >>>
> >>>
> >> Dave,
> >>
> >> It is the same messge, but as I think that everyone is
> >> misunderstooding the problem, I'll try to resume it:
> >>
> >> 1. I don't know why the driver reports version 6.5.2, as I don't have
> >> such a version.
> >
> >
> > The JDBC driver receives the version from the database backend when
> > connecting and that is what is printed by the
> > getDatabaseProductVersion() function. There is no way it can generate
> > a 6.x.x version number by itself.
> >
> > You _must_ be connecting to a 6.5.2 backend.
> >
> >
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
--
Thomas O'Dowd, CEO, Nooper.com - Mobile Services Inc., Tokyo, Japan
i-mode & FOMA consulting, development, testing: http://nooper.co.jp/


From: Carlos Correia <carlos(at)m16e(dot)com>
To: "Thomas O'Dowd" <tom(at)nooper(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>, Dave(at)micro-automation(dot)net
Subject: Re: Strange behaviour of JDBC driver for PostgreSQL
Date: 2002-12-19 11:20:58
Message-ID: 3E01AB9A.9060801@m16e.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

I've been working with Linux and Java for more then 4 years, so I'm sure
of what I'm saying: never had or used such a version!

Anyway, here's the output from:

$ psql -h REMOTEHOSTNAME -U USERNAME -c 'SELECT version();' DBNAME


version
----------------------------------------------------------------------------------------------------
PostgreSQL 7.2.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2
(Mandrake Linux 9.0 3.2-1mdk)
(1 row)

Best Regards,

Carlos

Thomas O'Dowd wrote:

>Carlos,
>
>To satisfy everyones curiosity why don't you try sending us the output
>of the following command from your local machine...
>
>$ psql -h REMOTEHOSTNAME -U USERNAME -c 'SELECT version();' DBNAME
>
>This will access the remote database DBNAME in much the same way as the
>driver does.
>
>Tom.
>
>On Thu, 2002-12-19 at 02:55, Carlos Correia wrote:
>
>
>>Fernando,
>>
>>i am sure the db is version 7.2.2
>>
>>Thanks anyway,
>>
>>Carlos
>>
>>Fernando Nasser wrote:
>>
>>
>>
>>>Carlos Correia wrote:
>>>
>>>
>>>
>>>>Dave Cramer wrote:
>>>>
>>>>
>>>>
>>>>>Carlos,
>>>>>
>>>>>Is this a new message today, or one from yesterday?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>Dave,
>>>>
>>>>It is the same messge, but as I think that everyone is
>>>>misunderstooding the problem, I'll try to resume it:
>>>>
>>>>1. I don't know why the driver reports version 6.5.2, as I don't have
>>>>such a version.
>>>>
>>>>
>>>The JDBC driver receives the version from the database backend when
>>>connecting and that is what is printed by the
>>>getDatabaseProductVersion() function. There is no way it can generate
>>>a 6.x.x version number by itself.
>>>
>>>You _must_ be connecting to a 6.5.2 backend.
>>>
>>>
>>>
>>>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 2: you can get off all lists at once with the unregister command
>> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>>
>>


From: Dave Cramer <Dave(at)micro-automation(dot)net>
To: Carlos Correia <carlos(at)m16e(dot)com>
Cc: "Thomas O'Dowd" <tom(at)nooper(dot)com>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Strange behaviour of JDBC driver for PostgreSQL
Date: 2002-12-19 11:42:36
Message-ID: 1040298156.16014.358.camel@inspiron.cramers
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Carlos,

Ok, so the question becomes what database did the driver connect to? I
can assure you it has no version information inside it so it must have
received that from somewhere? Also the fact the the driver behaves
differently when connected remotely suggests something is wrong.

so what did you input for the -h parameter below?

also can you write a java program that first gets the connection, and
then waits for input, then in another terminal session do a netstat -nlp
| grep 5432

Dave
On Thu, 2002-12-19 at 06:20, Carlos Correia wrote:
> I've been working with Linux and Java for more then 4 years, so I'm sure
> of what I'm saying: never had or used such a version!
>
> Anyway, here's the output from:
>
> $ psql -h REMOTEHOSTNAME -U USERNAME -c 'SELECT version();' DBNAME
>
>
>
> version
> ----------------------------------------------------------------------------------------------------
> PostgreSQL 7.2.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2
> (Mandrake Linux 9.0 3.2-1mdk)
> (1 row)
>
> Best Regards,
>
> Carlos
>
> Thomas O'Dowd wrote:
>
> >Carlos,
> >
> >To satisfy everyones curiosity why don't you try sending us the output
> >of the following command from your local machine...
> >
> >$ psql -h REMOTEHOSTNAME -U USERNAME -c 'SELECT version();' DBNAME
> >
> >This will access the remote database DBNAME in much the same way as the
> >driver does.
> >
> >Tom.
> >
> >On Thu, 2002-12-19 at 02:55, Carlos Correia wrote:
> >
> >
> >>Fernando,
> >>
> >>i am sure the db is version 7.2.2
> >>
> >>Thanks anyway,
> >>
> >>Carlos
> >>
> >>Fernando Nasser wrote:
> >>
> >>
> >>
> >>>Carlos Correia wrote:
> >>>
> >>>
> >>>
> >>>>Dave Cramer wrote:
> >>>>
> >>>>
> >>>>
> >>>>>Carlos,
> >>>>>
> >>>>>Is this a new message today, or one from yesterday?
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>Dave,
> >>>>
> >>>>It is the same messge, but as I think that everyone is
> >>>>misunderstooding the problem, I'll try to resume it:
> >>>>
> >>>>1. I don't know why the driver reports version 6.5.2, as I don't have
> >>>>such a version.
> >>>>
> >>>>
> >>>The JDBC driver receives the version from the database backend when
> >>>connecting and that is what is printed by the
> >>>getDatabaseProductVersion() function. There is no way it can generate
> >>>a 6.x.x version number by itself.
> >>>
> >>>You _must_ be connecting to a 6.5.2 backend.
> >>>
> >>>
> >>>
> >>>
> >>
> >>---------------------------(end of broadcast)---------------------------
> >>TIP 2: you can get off all lists at once with the unregister command
> >> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
> >>
> >>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
--
Dave Cramer <Dave(at)micro-automation(dot)net>


From: Carlos Correia <carlos(at)m16e(dot)com>
To: Dave Cramer <Dave(at)micro-automation(dot)net>
Cc: "Thomas O'Dowd" <tom(at)nooper(dot)com>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Strange behaviour of JDBC driver for PostgreSQL
Date: 2002-12-19 12:41:01
Message-ID: 3E01BE5D.4040304@m16e.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Hi, Dave

>Ok, so the question becomes what database did the driver connect to?
>
I'm pretty sure it's the only postgres database available.
The network has only 2 machines: DEVO (the server -- a Mandrake 9.0
fresh installation -- add: 192.168.1.1) and RA (a Windows 2000 box --
add: 192.168.1.2), they are connected directly.
Previously I was using Mandrake 8.0 (which came with version 7.0) and
everything was working OK!
Now, I made a fresh installation (formating ALL partitions) and Have
only 2 DBs installed: postgres (7.2!) and MySQL.
The tests were performed without being connected to the internet.

>I
>can assure you it has no version information inside it so it must have
>received that from somewhere? Also the fact the the driver behaves
>differently when connected remotely suggests something is wrong.
>so what did you input for the -h parameter below?
>
The server name: DEVO

>
>also can you write a java program that first gets the connection, and
>then waits for input, then in another terminal session do a netstat -nlp
>| grep 5432
>
>
OK! I'll try

BTW!, you have any idea about the meaning of SQLException reported?

Thanks,

Carlos


From: Dave Cramer <Dave(at)micro-automation(dot)net>
To: Carlos Correia <carlos(at)m16e(dot)com>
Cc: "Thomas O'Dowd" <tom(at)nooper(dot)com>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Strange behaviour of JDBC driver for PostgreSQL
Date: 2002-12-19 13:50:26
Message-ID: 1040305826.16014.360.camel@inspiron.cramers
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Carlos,

The exception is indicating that you aren't connected to a database
compatible with the driver. The driver doesn't support 6.5.2 databases
so that's why all the confusion.

Dave
On Thu, 2002-12-19 at 07:41, Carlos Correia wrote:
> Hi, Dave
>
> >Ok, so the question becomes what database did the driver connect to?
> >
> I'm pretty sure it's the only postgres database available.
> The network has only 2 machines: DEVO (the server -- a Mandrake 9.0
> fresh installation -- add: 192.168.1.1) and RA (a Windows 2000 box --
> add: 192.168.1.2), they are connected directly.
> Previously I was using Mandrake 8.0 (which came with version 7.0) and
> everything was working OK!
> Now, I made a fresh installation (formating ALL partitions) and Have
> only 2 DBs installed: postgres (7.2!) and MySQL.
> The tests were performed without being connected to the internet.
>
> >I
> >can assure you it has no version information inside it so it must have
> >received that from somewhere? Also the fact the the driver behaves
> >differently when connected remotely suggests something is wrong.
> >so what did you input for the -h parameter below?
> >
> The server name: DEVO
>
> >
> >also can you write a java program that first gets the connection, and
> >then waits for input, then in another terminal session do a netstat -nlp
> >| grep 5432
> >
> >
> OK! I'll try
>
> BTW!, you have any idea about the meaning of SQLException reported?
>
> Thanks,
>
> Carlos
--
Dave Cramer <Dave(at)micro-automation(dot)net>