What needs to be done?

Started by Rene Pijlmanover 24 years ago41 messageshackers
Jump to latest
#1Rene Pijlman
rpijlman@wanadoo.nl

Hello,

I read in comp.lang.java.databases that help is needed with
development of the JDBC driver. Can someone please provide some
pointers to what needs to be done?

What are the open issues? Is it JDBC 2.0 compliance? PostgreSQL
7.1 support?

I've seen a lot of postings about BLOB problems, and
JDBC-standard BLOB support is on the overall todo list
(http://www.postgresql.org/docs/todo.html). Is that still open
for development? Is there anyone who has already looked at
JDBC-standard BLOB support? If so, what are the challenges and
complications?

I can't promise anything yet, but I'll certainly consider
helping with PostgreSQL/JDBC development. I'm fluent in Java and
have developed a database driver before (for Oracle in a
proprietary product). I'm about to spend quite a lot of time on
developing a web application in Java on top of PostgreSQL, so I
certainly have an interest in good JDBC support.

If you're not a developer but a user of the driver, what are
your current complaints or wish list items?

Regards,
Ren� Pijlman

#2Dave Cramer
pg@fastcrypt.com
In reply to: Rene Pijlman (#1)
RE: What needs to be done?

Rene,

Certainly the blob support needs to be done. That seems to be high on
the list

Dave

-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Rene Pijlman
Sent: August 1, 2001 3:52 PM
To: pgsql-jdbc@postgresql.org
Subject: [JDBC] What needs to be done?

Hello,

I read in comp.lang.java.databases that help is needed with development
of the JDBC driver. Can someone please provide some pointers to what
needs to be done?

What are the open issues? Is it JDBC 2.0 compliance? PostgreSQL 7.1
support?

I've seen a lot of postings about BLOB problems, and JDBC-standard BLOB
support is on the overall todo list
(http://www.postgresql.org/docs/todo.html). Is that still open for
development? Is there anyone who has already looked at JDBC-standard
BLOB support? If so, what are the challenges and complications?

I can't promise anything yet, but I'll certainly consider helping with
PostgreSQL/JDBC development. I'm fluent in Java and have developed a
database driver before (for Oracle in a proprietary product). I'm about
to spend quite a lot of time on developing a web application in Java on
top of PostgreSQL, so I certainly have an interest in good JDBC support.

If you're not a developer but a user of the driver, what are your
current complaints or wish list items?

Regards,
Ren� Pijlman

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

#3Anders Bengtsson
ndrsbngtssn@yahoo.se
In reply to: Rene Pijlman (#1)
Re: What needs to be done?

On Wed, 1 Aug 2001, Rene Pijlman wrote:

Hello,

I read in comp.lang.java.databases that help is needed with
development of the JDBC driver. Can someone please provide some
pointers to what needs to be done?

What are the open issues? Is it JDBC 2.0 compliance? PostgreSQL
7.1 support?

I've seen a lot of postings about BLOB problems, and
JDBC-standard BLOB support is on the overall todo list
(http://www.postgresql.org/docs/todo.html). Is that still open
for development? Is there anyone who has already looked at
JDBC-standard BLOB support? If so, what are the challenges and
complications?

The broken BLOB support is a complete showstopper for PostgreSQL in some
environments, so that feels like a high priority.

As for JDBC 2.0, has anyone tried some sort of test suite for compliance?
I know that some differences from the SQL standards make it impossible for
PostgreSQL to be truly JDBC 2.0 compliant at the time, but it would be
nice to know if we are as close to compliance as we can be.

/Anders
_____________________________________________________________________
A n d e r s B e n g t s s o n ndrsbngtssn@yahoo.se
Stockholm, Sweden

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

#4Ricardo Maia
rmaia@criticalsoftware.com
In reply to: Rene Pijlman (#1)
Re: What needs to be done?

On Wednesday 01 August 2001 20:52, Rene Pijlman wrote:

Hello,

I read in comp.lang.java.databases that help is needed with
development of the JDBC driver. Can someone please provide some
pointers to what needs to be done?

What are the open issues? Is it JDBC 2.0 compliance? PostgreSQL
7.1 support?

I've seen a lot of postings about BLOB problems, and
JDBC-standard BLOB support is on the overall todo list
(http://www.postgresql.org/docs/todo.html). Is that still open
for development? Is there anyone who has already looked at
JDBC-standard BLOB support? If so, what are the challenges and
complications?

I can't promise anything yet, but I'll certainly consider
helping with PostgreSQL/JDBC development. I'm fluent in Java and
have developed a database driver before (for Oracle in a
proprietary product). I'm about to spend quite a lot of time on
developing a web application in Java on top of PostgreSQL, so I
certainly have an interest in good JDBC support.

If you're not a developer but a user of the driver, what are
your current complaints or wish list items?

Hi,

I am working in a client application that uses JDBC to access several
databases. The problem is that, as the PostgreSQL JDBC driver doesn't follow
JDBC Standard I had to write some specific code for use it with PostgreSQL DB.

It would be very interesting to have a JDBC 2.0 compliant driver.
I would surely try it and give some feedback!!!

Ricardo Maia

Show quoted text

Regards,
Ren� Pijlman

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

#5Rene Pijlman
rpijlman@wanadoo.nl
In reply to: Ricardo Maia (#4)
Re: What needs to be done?

On Wed, 1 Aug 2001 22:49:40 +0100, Ricardo Maia wrote:

The problem is that, as the PostgreSQL JDBC driver doesn't
follow JDBC Standard I had to write some specific code for
use it with PostgreSQL DB.

So what exactly are the deviations from the standard that you
encountered?

Regards,
Ren� Pijlman

#6Ricardo Maia
rmaia@criticalsoftware.com
In reply to: Rene Pijlman (#5)
Re: What needs to be done?

For example when I call the method:

DatabaseMetaData.getTypeInfo()

I whould expect to see the SQL Type BLOB mapped as an oid.

see attach

Ricardo Maia

Show quoted text

On Wednesday 01 August 2001 23:29, Rene Pijlman wrote:

On Wed, 1 Aug 2001 22:49:40 +0100, Ricardo Maia wrote:

The problem is that, as the PostgreSQL JDBC driver doesn't
follow JDBC Standard I had to write some specific code for
use it with PostgreSQL DB.

So what exactly are the deviations from the standard that you
encountered?

Regards,
Ren� Pijlman

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Attachments:

GetTypesInfo.javatext/x-java; name=GetTypesInfo.javaDownload
#7Barry Lind
barry@xythos.com
In reply to: Rene Pijlman (#1)
Re: What needs to be done?

Examples please? We need to know what is broken/missing in order for it
to be fixed. I know there are people out there who would be glad to fix
bugs in the JDBC driver if they know about them. Please post the
problems you encountered to the jdbc mail list.

thanks,
--Barry

Ricardo Maia wrote:

Show quoted text

On Wednesday 01 August 2001 20:52, Rene Pijlman wrote:

Hello,

I read in comp.lang.java.databases that help is needed with
development of the JDBC driver. Can someone please provide some
pointers to what needs to be done?

What are the open issues? Is it JDBC 2.0 compliance? PostgreSQL
7.1 support?

I've seen a lot of postings about BLOB problems, and
JDBC-standard BLOB support is on the overall todo list
(http://www.postgresql.org/docs/todo.html). Is that still open
for development? Is there anyone who has already looked at
JDBC-standard BLOB support? If so, what are the challenges and
complications?

I can't promise anything yet, but I'll certainly consider
helping with PostgreSQL/JDBC development. I'm fluent in Java and
have developed a database driver before (for Oracle in a
proprietary product). I'm about to spend quite a lot of time on
developing a web application in Java on top of PostgreSQL, so I
certainly have an interest in good JDBC support.

If you're not a developer but a user of the driver, what are
your current complaints or wish list items?

Hi,

I am working in a client application that uses JDBC to access several
databases. The problem is that, as the PostgreSQL JDBC driver doesn't follow
JDBC Standard I had to write some specific code for use it with PostgreSQL DB.

It would be very interesting to have a JDBC 2.0 compliant driver.
I would surely try it and give some feedback!!!

Ricardo Maia

Regards,
Ren� Pijlman

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

#8Barry Lind
barry@xythos.com
In reply to: Rene Pijlman (#1)
Re: What needs to be done?

Please send us all of the issues you have or know about. Just providing
examples of some of the problems will only get fixes for some of the
problems. What would be really useful is a list of all the issues you
know about. That way they can end up on the TODO list and get addressed.

thanks,
--Barry

Ricardo Maia wrote:

Show quoted text

For example when I call the method:

DatabaseMetaData.getTypeInfo()

I whould expect to see the SQL Type BLOB mapped as an oid.

see attach

Ricardo Maia

On Wednesday 01 August 2001 23:29, Rene Pijlman wrote:

On Wed, 1 Aug 2001 22:49:40 +0100, Ricardo Maia wrote:

The problem is that, as the PostgreSQL JDBC driver doesn't
follow JDBC Standard I had to write some specific code for
use it with PostgreSQL DB.

So what exactly are the deviations from the standard that you
encountered?

Regards,
Ren� Pijlman

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

------------------------------------------------------------------------

package databasetest;

import java.sql.*;

public class GetTypesInfo {

public static void main(String args[ ]) {

String url = "jdbc:postgresql://127.0.0.1/test";

Connection con;

DatabaseMetaData dbmd;

try {
Class.forName("org.postgresql.Driver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
}

try {
con = DriverManager.getConnection(url,"bobby", "tareco");

dbmd = con.getMetaData();

ResultSet rs = dbmd.getTypeInfo();

while (rs.next()) {

String typeName = rs.getString("TYPE_NAME");

short dataType = rs.getShort("DATA_TYPE");

String createParams = rs.getString("CREATE_PARAMS");

int nullable = rs.getInt("NULLABLE");

boolean caseSensitive = rs.getBoolean("CASE_SENSITIVE");

if(dataType != java.sql.Types.OTHER)
{
System.out.println("DBMS type " + typeName + ":");
System.out.println(" java.sql.Types: " + typeName(dataType));
System.out.print(" parameters used to create: ");
System.out.println(createParams);
System.out.println(" nullable?: " + nullable);
System.out.print(" case sensitive?: ");
System.out.println(caseSensitive);
System.out.println("");
}
}

con.close();
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
}
}

public static String typeName(int i)
{
switch(i){
case java.sql.Types.ARRAY: return "ARRAY";
case java.sql.Types.BIGINT: return "BIGINT";
case java.sql.Types.BINARY: return "BINARY";
case java.sql.Types.BIT: return "BIT";
case java.sql.Types.BLOB: return "BLOB";
case java.sql.Types.CHAR: return "CHAR";
case java.sql.Types.CLOB: return "CLOB";
case java.sql.Types.DATE: return "DATE";
case java.sql.Types.DECIMAL: return "DECIMAL";
case java.sql.Types.DISTINCT: return "DISTINCT";
case java.sql.Types.DOUBLE: return "DOUBLE";
case java.sql.Types.FLOAT: return "FLOAT";
case java.sql.Types.INTEGER: return "INTEGER";
case java.sql.Types.JAVA_OBJECT: return "JAVA_OBJECT";
case java.sql.Types.LONGVARBINARY: return "LONGVARBINARY";
case java.sql.Types.LONGVARCHAR: return "LONGVARCHAR";
case java.sql.Types.NULL: return "NULL";
case java.sql.Types.NUMERIC: return "NUMERIC";
case java.sql.Types.OTHER: return "OTHER";
case java.sql.Types.REAL: return "REAL";
case java.sql.Types.REF: return "REF";
case java.sql.Types.SMALLINT: return "SMALLINT";
case java.sql.Types.STRUCT: return "STRUCT";
case java.sql.Types.TIME: return "TIME";
case java.sql.Types.TIMESTAMP: return "TIMESTAMP";
case java.sql.Types.TINYINT: return "TINYINT";
case java.sql.Types.VARBINARY: return "VARBINARY";
case java.sql.Types.VARCHAR: return "VARCHAR";
default: return "";
}
}
}

------------------------------------------------------------------------

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

GetTypesInfo.java

Content-Type:

text/x-java
Content-Encoding:

base64

------------------------------------------------------------------------
Part 1.3

Content-Type:

text/plain
Content-Encoding:

binary

#9Barry Lind
barry@xythos.com
In reply to: Rene Pijlman (#1)
Re: What needs to be done?

I actually think the response for 'oid' is correct. It reports the oid
as java type integer (which is the real datatype of the value stored).
A column of type oid can be used for may different things. It can be
used for blobs, but not all columns of type oid are used for blobs.
Another use of a column of type oid is to store foreign keys from one
table to another. Since all tables have a builtin column named 'oid' of
type oid, it is very convenient to use this value in foreign keys on
other tables. Assuming that oid = blob would break those applications.

I hope everyone that uses postgresql and jdbc understands that BLOB
support is one area with many problems, some of which can be fixed in
the JDBC code, but others that will require better support in the
underlying database.

thanks,
--Barry

Ricardo Maia wrote:

Show quoted text

For example when I call the method:

DatabaseMetaData.getTypeInfo()

I whould expect to see the SQL Type BLOB mapped as an oid.

see attach

Ricardo Maia

On Wednesday 01 August 2001 23:29, Rene Pijlman wrote:

On Wed, 1 Aug 2001 22:49:40 +0100, Ricardo Maia wrote:

The problem is that, as the PostgreSQL JDBC driver doesn't
follow JDBC Standard I had to write some specific code for
use it with PostgreSQL DB.

So what exactly are the deviations from the standard that you
encountered?

Regards,
Ren� Pijlman

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

------------------------------------------------------------------------

package databasetest;

import java.sql.*;

public class GetTypesInfo {

public static void main(String args[ ]) {

String url = "jdbc:postgresql://127.0.0.1/test";

Connection con;

DatabaseMetaData dbmd;

try {
Class.forName("org.postgresql.Driver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
}

try {
con = DriverManager.getConnection(url,"bobby", "tareco");

dbmd = con.getMetaData();

ResultSet rs = dbmd.getTypeInfo();

while (rs.next()) {

String typeName = rs.getString("TYPE_NAME");

short dataType = rs.getShort("DATA_TYPE");

String createParams = rs.getString("CREATE_PARAMS");

int nullable = rs.getInt("NULLABLE");

boolean caseSensitive = rs.getBoolean("CASE_SENSITIVE");

if(dataType != java.sql.Types.OTHER)
{
System.out.println("DBMS type " + typeName + ":");
System.out.println(" java.sql.Types: " + typeName(dataType));
System.out.print(" parameters used to create: ");
System.out.println(createParams);
System.out.println(" nullable?: " + nullable);
System.out.print(" case sensitive?: ");
System.out.println(caseSensitive);
System.out.println("");
}
}

con.close();
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
}
}

public static String typeName(int i)
{
switch(i){
case java.sql.Types.ARRAY: return "ARRAY";
case java.sql.Types.BIGINT: return "BIGINT";
case java.sql.Types.BINARY: return "BINARY";
case java.sql.Types.BIT: return "BIT";
case java.sql.Types.BLOB: return "BLOB";
case java.sql.Types.CHAR: return "CHAR";
case java.sql.Types.CLOB: return "CLOB";
case java.sql.Types.DATE: return "DATE";
case java.sql.Types.DECIMAL: return "DECIMAL";
case java.sql.Types.DISTINCT: return "DISTINCT";
case java.sql.Types.DOUBLE: return "DOUBLE";
case java.sql.Types.FLOAT: return "FLOAT";
case java.sql.Types.INTEGER: return "INTEGER";
case java.sql.Types.JAVA_OBJECT: return "JAVA_OBJECT";
case java.sql.Types.LONGVARBINARY: return "LONGVARBINARY";
case java.sql.Types.LONGVARCHAR: return "LONGVARCHAR";
case java.sql.Types.NULL: return "NULL";
case java.sql.Types.NUMERIC: return "NUMERIC";
case java.sql.Types.OTHER: return "OTHER";
case java.sql.Types.REAL: return "REAL";
case java.sql.Types.REF: return "REF";
case java.sql.Types.SMALLINT: return "SMALLINT";
case java.sql.Types.STRUCT: return "STRUCT";
case java.sql.Types.TIME: return "TIME";
case java.sql.Types.TIMESTAMP: return "TIMESTAMP";
case java.sql.Types.TINYINT: return "TINYINT";
case java.sql.Types.VARBINARY: return "VARBINARY";
case java.sql.Types.VARCHAR: return "VARCHAR";
default: return "";
}
}
}

------------------------------------------------------------------------

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

GetTypesInfo.java

Content-Type:

text/x-java
Content-Encoding:

base64

------------------------------------------------------------------------
Part 1.3

Content-Type:

text/plain
Content-Encoding:

binary

#10Barry Lind
barry@xythos.com
In reply to: Anders Bengtsson (#3)
Re: What needs to be done?

Anders,

What aspects of BLOB support do you consider broken? Are these aspects
that are broken in the JDBC layer or are 'broken' at the server layer?

thanks,
--Barry

Anders Bengtsson wrote:

Show quoted text

On Wed, 1 Aug 2001, Rene Pijlman wrote:

Hello,

I read in comp.lang.java.databases that help is needed with
development of the JDBC driver. Can someone please provide some
pointers to what needs to be done?

What are the open issues? Is it JDBC 2.0 compliance? PostgreSQL
7.1 support?

I've seen a lot of postings about BLOB problems, and
JDBC-standard BLOB support is on the overall todo list
(http://www.postgresql.org/docs/todo.html). Is that still open
for development? Is there anyone who has already looked at
JDBC-standard BLOB support? If so, what are the challenges and
complications?

The broken BLOB support is a complete showstopper for PostgreSQL in some
environments, so that feels like a high priority.

As for JDBC 2.0, has anyone tried some sort of test suite for compliance?
I know that some differences from the SQL standards make it impossible for
PostgreSQL to be truly JDBC 2.0 compliant at the time, but it would be
nice to know if we are as close to compliance as we can be.

/Anders
_____________________________________________________________________
A n d e r s B e n g t s s o n ndrsbngtssn@yahoo.se
Stockholm, Sweden

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

#11Barry Lind
barry@xythos.com
In reply to: Rene Pijlman (#1)
Re: What needs to be done?

I actually consider the biggest problem the fact the the 'official'
postgres jdbc website is very much out of date
(http://jdbc.postgresql.org). (it doesn't even have the 7.1 drivers).
I feel that either someone needs to maintain this page; or someone needs
to create a new website and get the jdbc.postgresql.org DNS entry to
point to the new site, or the page should just be decommisioned. At
this point I think it is doing more harm than good.

thanks,
--Barry

Rene Pijlman wrote:

Show quoted text

Hello,

I read in comp.lang.java.databases that help is needed with
development of the JDBC driver. Can someone please provide some
pointers to what needs to be done?

What are the open issues? Is it JDBC 2.0 compliance? PostgreSQL
7.1 support?

I've seen a lot of postings about BLOB problems, and
JDBC-standard BLOB support is on the overall todo list
(http://www.postgresql.org/docs/todo.html). Is that still open
for development? Is there anyone who has already looked at
JDBC-standard BLOB support? If so, what are the challenges and
complications?

I can't promise anything yet, but I'll certainly consider
helping with PostgreSQL/JDBC development. I'm fluent in Java and
have developed a database driver before (for Oracle in a
proprietary product). I'm about to spend quite a lot of time on
developing a web application in Java on top of PostgreSQL, so I
certainly have an interest in good JDBC support.

If you're not a developer but a user of the driver, what are
your current complaints or wish list items?

Regards,
Ren� Pijlman

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

#12Bruce Momjian
bruce@momjian.us
In reply to: Barry Lind (#11)
Re: What needs to be done?

This appeared on the JDBC list. Do we need to address this?

I actually consider the biggest problem the fact the the 'official'
postgres jdbc website is very much out of date
(http://jdbc.postgresql.org). (it doesn't even have the 7.1 drivers).
I feel that either someone needs to maintain this page; or someone needs
to create a new website and get the jdbc.postgresql.org DNS entry to
point to the new site, or the page should just be decommisioned. At
this point I think it is doing more harm than good.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#13Dave Cramer
pg@fastcrypt.com
In reply to: Bruce Momjian (#12)
RE: Re: What needs to be done?

Bruce,

I am willing to make my site the "official" site. For now we could just
repoint the dns to jdbc.fastcrypt.com, or I could build them on my site,
and ftp them into the postgres site?

I think we do need to address it. A lot of people go there for answers.

Dave

-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Bruce Momjian
Sent: August 1, 2001 10:41 PM
To: Barry Lind
Cc: Rene Pijlman; pgsql-jdbc@postgresql.org; PostgreSQL-development
Subject: [JDBC] Re: What needs to be done?

This appeared on the JDBC list. Do we need to address this?

I actually consider the biggest problem the fact the the 'official'
postgres jdbc website is very much out of date
(http://jdbc.postgresql.org). (it doesn't even have the 7.1 drivers).

I feel that either someone needs to maintain this page; or someone

needs

to create a new website and get the jdbc.postgresql.org DNS entry to
point to the new site, or the page should just be decommisioned. At
this point I think it is doing more harm than good.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania
19026

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

#14Bruce Momjian
bruce@momjian.us
In reply to: Dave Cramer (#13)
Re: Re: What needs to be done?

Let's see what people say on hackers.

Bruce,

I am willing to make my site the "official" site. For now we could just
repoint the dns to jdbc.fastcrypt.com, or I could build them on my site,
and ftp them into the postgres site?

I think we do need to address it. A lot of people go there for answers.

Dave

-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Bruce Momjian
Sent: August 1, 2001 10:41 PM
To: Barry Lind
Cc: Rene Pijlman; pgsql-jdbc@postgresql.org; PostgreSQL-development
Subject: [JDBC] Re: What needs to be done?

This appeared on the JDBC list. Do we need to address this?

I actually consider the biggest problem the fact the the 'official'
postgres jdbc website is very much out of date
(http://jdbc.postgresql.org). (it doesn't even have the 7.1 drivers).

I feel that either someone needs to maintain this page; or someone

needs

to create a new website and get the jdbc.postgresql.org DNS entry to
point to the new site, or the page should just be decommisioned. At
this point I think it is doing more harm than good.

-- 
Bruce Momjian                        |  http://candle.pha.pa.us
pgman@candle.pha.pa.us               |  (610) 853-3000
+  If your life is a hard drive,     |  830 Blythe Avenue
+  Christ can be your backup.        |  Drexel Hill, Pennsylvania
19026

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#15Vince Vielhaber
vev@michvhf.com
In reply to: Bruce Momjian (#12)
Re: Re: What needs to be done?

On Wed, 1 Aug 2001, Bruce Momjian wrote:

This appeared on the JDBC list. Do we need to address this?

Where's Peter Mount? Isn't he the maintainer?

Vince.

I actually consider the biggest problem the fact the the 'official'
postgres jdbc website is very much out of date
(http://jdbc.postgresql.org). (it doesn't even have the 7.1 drivers).
I feel that either someone needs to maintain this page; or someone needs
to create a new website and get the jdbc.postgresql.org DNS entry to
point to the new site, or the page should just be decommisioned. At
this point I think it is doing more harm than good.

--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net
56K Nationwide Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================

#16Ricardo Maia
rmaia@criticalsoftware.com
In reply to: Barry Lind (#9)
Re: Re: What needs to be done?

So how whould I map the BLOB java type in the corresponding SQL type?

I want to create a table with a BLOB attribute, but I want that my code can
run for PostgreSQL, Oracle and other BD that handles BLOBs.

So first I had to map the BLOB in the corresponding BD SQL type and then
create the table with an attribute of that SQL type.

Ricardo Maia

Show quoted text

On Thursday 02 August 2001 03:16, Barry Lind wrote:

I actually think the response for 'oid' is correct. It reports the oid
as java type integer (which is the real datatype of the value stored).
A column of type oid can be used for may different things. It can be
used for blobs, but not all columns of type oid are used for blobs.
Another use of a column of type oid is to store foreign keys from one
table to another. Since all tables have a builtin column named 'oid' of
type oid, it is very convenient to use this value in foreign keys on
other tables. Assuming that oid = blob would break those applications.

I hope everyone that uses postgresql and jdbc understands that BLOB
support is one area with many problems, some of which can be fixed in
the JDBC code, but others that will require better support in the
underlying database.

thanks,
--Barry

Ricardo Maia wrote:

For example when I call the method:

DatabaseMetaData.getTypeInfo()

I whould expect to see the SQL Type BLOB mapped as an oid.

see attach

Ricardo Maia

On Wednesday 01 August 2001 23:29, Rene Pijlman wrote:

On Wed, 1 Aug 2001 22:49:40 +0100, Ricardo Maia wrote:

The problem is that, as the PostgreSQL JDBC driver doesn't
follow JDBC Standard I had to write some specific code for
use it with PostgreSQL DB.

So what exactly are the deviations from the standard that you
encountered?

Regards,
Ren� Pijlman

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

------------------------------------------------------------------------

package databasetest;

import java.sql.*;

public class GetTypesInfo {

public static void main(String args[ ]) {

String url = "jdbc:postgresql://127.0.0.1/test";

Connection con;

DatabaseMetaData dbmd;

try {
Class.forName("org.postgresql.Driver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
}

try {
con = DriverManager.getConnection(url,"bobby", "tareco");

dbmd = con.getMetaData();

ResultSet rs = dbmd.getTypeInfo();

while (rs.next()) {

String typeName = rs.getString("TYPE_NAME");

short dataType = rs.getShort("DATA_TYPE");

String createParams = rs.getString("CREATE_PARAMS");

int nullable = rs.getInt("NULLABLE");

boolean caseSensitive = rs.getBoolean("CASE_SENSITIVE");

if(dataType != java.sql.Types.OTHER)
{
System.out.println("DBMS type " + typeName + ":");
System.out.println(" java.sql.Types: " +
typeName(dataType)); System.out.print(" parameters used to create:
");
System.out.println(createParams);
System.out.println(" nullable?: " + nullable);
System.out.print(" case sensitive?: ");
System.out.println(caseSensitive);
System.out.println("");
}
}

con.close();
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
}
}

public static String typeName(int i)
{
switch(i){
case java.sql.Types.ARRAY: return "ARRAY";
case java.sql.Types.BIGINT: return "BIGINT";
case java.sql.Types.BINARY: return "BINARY";
case java.sql.Types.BIT: return "BIT";
case java.sql.Types.BLOB: return "BLOB";
case java.sql.Types.CHAR: return "CHAR";
case java.sql.Types.CLOB: return "CLOB";
case java.sql.Types.DATE: return "DATE";
case java.sql.Types.DECIMAL: return "DECIMAL";
case java.sql.Types.DISTINCT: return "DISTINCT";
case java.sql.Types.DOUBLE: return "DOUBLE";
case java.sql.Types.FLOAT: return "FLOAT";
case java.sql.Types.INTEGER: return "INTEGER";
case java.sql.Types.JAVA_OBJECT: return "JAVA_OBJECT";
case java.sql.Types.LONGVARBINARY: return "LONGVARBINARY";
case java.sql.Types.LONGVARCHAR: return "LONGVARCHAR";
case java.sql.Types.NULL: return "NULL";
case java.sql.Types.NUMERIC: return "NUMERIC";
case java.sql.Types.OTHER: return "OTHER";
case java.sql.Types.REAL: return "REAL";
case java.sql.Types.REF: return "REF";
case java.sql.Types.SMALLINT: return "SMALLINT";
case java.sql.Types.STRUCT: return "STRUCT";
case java.sql.Types.TIME: return "TIME";
case java.sql.Types.TIMESTAMP: return "TIMESTAMP";
case java.sql.Types.TINYINT: return "TINYINT";
case java.sql.Types.VARBINARY: return "VARBINARY";
case java.sql.Types.VARCHAR: return "VARCHAR";
default: return "";
}
}
}

------------------------------------------------------------------------

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

GetTypesInfo.java

Content-Type:

text/x-java
Content-Encoding:

base64

------------------------------------------------------------------------
Part 1.3

Content-Type:

text/plain
Content-Encoding:

binary

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

#17Gunnar Rønning
gunnar@polygnosis.com
In reply to: Barry Lind (#10)
Re: Re: What needs to be done?

[Answering as Anders Norwegian brother :-]

* Barry Lind <barry@xythos.com> wrote:
|
| Anders,
|
| What aspects of BLOB support do you consider broken? Are these
| aspects that are broken in the JDBC layer or are 'broken' at the
| server layer?

We should have support for the bytea datatype, so applications are not
required to wrap blob operations into a transaction. This has been
a showstopper for using PostgreSQL with the Turbine framework at Apache
for a long time. If we get that to work with PostgreSQL we will attract
more users and be a step closer to world domination ;-)

--
Gunnar R�nning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/

#18Gunnar Rønning
gunnar@polygnosis.com
In reply to: Barry Lind (#9)
Re: Re: What needs to be done?

* Barry Lind <barry@xythos.com> wrote:
|
| I actually think the response for 'oid' is correct. It reports the

Well, maybe one could check if the oid is a foreign key refering to
the lo table.

--
Gunnar R�nning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/

#19Liam Stewart
liams@redhat.com
In reply to: Anders Bengtsson (#3)
Re: What needs to be done?

On Wed, Aug 01, 2001 at 10:19:01PM +0200, Anders Bengtsson wrote:

As for JDBC 2.0, has anyone tried some sort of test suite for compliance?
I know that some differences from the SQL standards make it impossible for
PostgreSQL to be truly JDBC 2.0 compliant at the time, but it would be
nice to know if we are as close to compliance as we can be.

I have run the JDBC test suite[1]http://java.sun.com/products/jdbc/jdbctestsuite-1_2_1.html http://java.sun.com/products/jdbc/download.html#jdbctestsuite against the jdbc driver that comes
with the postgresql 7.1.2 release and the driver that is in CVS. About
17% of the tests fail in both cases. From a glance, it looks like most
of those failures are from unimplemented methods, either because support
hasn't been added to the driver or there isn't any backend support.
There are some weird failures as well (i.e.: a test fails once, but
succeeds on later runs). Once I have combed through the results (and
there are a lot of results!), I will post a report here.

Liam

[1]: http://java.sun.com/products/jdbc/jdbctestsuite-1_2_1.html http://java.sun.com/products/jdbc/download.html#jdbctestsuite
http://java.sun.com/products/jdbc/download.html#jdbctestsuite

The instructions are fairly straightforward, but application server
stuff is a bit vague. Using j2ee as the application server is what they
expect even though it doesn't say so in the docs. I can provide
instructions.

--
Liam Stewart :: Red Hat Canada, Ltd. :: liams@redhat.com

#20Bruce Momjian
bruce@momjian.us
In reply to: Barry Lind (#11)
Re: Re: What needs to be done?

I actually consider the biggest problem the fact the the 'official'
postgres jdbc website is very much out of date
(http://jdbc.postgresql.org). (it doesn't even have the 7.1 drivers).
I feel that either someone needs to maintain this page; or someone needs
to create a new website and get the jdbc.postgresql.org DNS entry to
point to the new site, or the page should just be decommisioned. At
this point I think it is doing more harm than good.

Just a followup. Peter has replied to a few people stating he is very
busy and wants someone to take over the jdbc.postgresql.org website.
Marc, Vince, and others are working on it now.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#21Barry Lind
barry@xythos.com
In reply to: Rene Pijlman (#1)
#22Rene Pijlman
rpijlman@wanadoo.nl
In reply to: Bruce Momjian (#20)
#23Vince Vielhaber
vev@michvhf.com
In reply to: Rene Pijlman (#22)
#24Barry Lind
barry@xythos.com
In reply to: Rene Pijlman (#1)
#25Ricardo Maia
rmaia@criticalsoftware.com
In reply to: Barry Lind (#21)
#26Anders Bengtsson
ndrsbngtssn@yahoo.se
In reply to: Barry Lind (#10)
#27Anders Bengtsson
ndrsbngtssn@yahoo.se
In reply to: Barry Lind (#24)
#28The Hermit Hacker
scrappy@hub.org
In reply to: Rene Pijlman (#22)
#29Bruce Momjian
bruce@momjian.us
In reply to: Barry Lind (#21)
#30Barry Lind
barry@xythos.com
In reply to: Anders Bengtsson (#3)
#31Tom Lane
tgl@sss.pgh.pa.us
In reply to: Barry Lind (#30)
#32Barry Lind
barry@xythos.com
In reply to: Anders Bengtsson (#3)
#33Dave Cramer
pg@fastcrypt.com
In reply to: Bruce Momjian (#29)
#34Bruce Momjian
bruce@momjian.us
In reply to: Barry Lind (#32)
#35Barry Lind
barry@xythos.com
In reply to: Bruce Momjian (#34)
#36Bruce Momjian
bruce@momjian.us
In reply to: Barry Lind (#35)
#37Rene Pijlman
rpijlman@wanadoo.nl
In reply to: Barry Lind (#30)
#38Bruce Momjian
bruce@momjian.us
In reply to: Vince Vielhaber (#15)
#39Bruce Momjian
bruce@momjian.us
In reply to: Barry Lind (#30)
#40Vince Vielhaber
vev@michvhf.com
In reply to: Bruce Momjian (#38)
#41The Hermit Hacker
scrappy@hub.org
In reply to: Vince Vielhaber (#40)