pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedjdbc driver: Why it isn't jdbcCompliant?
7+ messages / 4 participants
[nested] [flat]
* jdbc driver: Why it isn't jdbcCompliant?
@ 2000-05-26 23:26 Janossy Gergely <gjano@freemail.hu>
2000-05-28 10:42 ` Re: jdbc driver: Why it isn't jdbcCompliant? Gunnar R|nning <gunnar@candleweb.no>
0 siblings, 1 reply; 7+ messages in thread
From: Janossy Gergely @ 2000-05-26 23:26 UTC (permalink / raw)
To: pgsql-interfaces
Hi!
I'm using Sun JDK 1.2.2 and tried to use the pgsql interface with postgresql
6.x and 7.0 as well. I couldn't use any of the interfaces because
the method Driver.jdbcCompliant() is always false. Even with mysql driver.
I used a little test program:
if (evt.getSource()==registerButton) {
try {
Driver d=(Driver)Class.forName(driver.getText()).newInstance();
kiir("Registered driver: "+driver.getText());
kiir("Verzio: "+d.getMajorVersion()+"."+d.getMinorVersion());
String s;
if (!d.jdbcCompliant()) s=" not ";
else s=" ";
kiir("This driver is "+s+"JDBC-compliant");
} catch (Exception e) {
hiba("Registration failed", e);
}
where driver.Gettext is the path of the postgres driver (org.postgres.Driver
i think.)
Thanx for your help
Greg.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: jdbc driver: Why it isn't jdbcCompliant?
2000-05-26 23:26 jdbc driver: Why it isn't jdbcCompliant? Janossy Gergely <gjano@freemail.hu>
@ 2000-05-28 10:42 ` Gunnar R|nning <gunnar@candleweb.no>
2000-05-29 18:50 ` Re: jdbc driver: Why it isn't jdbcCompliant? Joseph Shraibman <jks@selectacast.net>
0 siblings, 1 reply; 7+ messages in thread
From: Gunnar R|nning @ 2000-05-28 10:42 UTC (permalink / raw)
To: Janossy Gergely <gjano@freemail.hu>; +Cc: pgsql-interfaces
Janossy Gergely <gjano@freemail.hu> writes:
> Hi!
>
> I'm using Sun JDK 1.2.2 and tried to use the pgsql interface with postgresql
> 6.x and 7.0 as well. I couldn't use any of the interfaces because
> the method Driver.jdbcCompliant() is always false. Even with mysql driver.
Hi Janossy,
I guess this only means that the driver doesn't implement all the
interfaces according to the JDBC specification. But it works fine for most
applications as long you not are depending on esoteric(or special)
features. In fact I'm very satisfied with it for an JDBC based web application
I ported this week to PostgreSQL. I'm also running Sun JDK 1.2.2 as you do.
regards,
Gunnar
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: jdbc driver: Why it isn't jdbcCompliant?
2000-05-26 23:26 jdbc driver: Why it isn't jdbcCompliant? Janossy Gergely <gjano@freemail.hu>
2000-05-28 10:42 ` Re: jdbc driver: Why it isn't jdbcCompliant? Gunnar R|nning <gunnar@candleweb.no>
@ 2000-05-29 18:50 ` Joseph Shraibman <jks@selectacast.net>
2000-05-29 23:23 ` Re: jdbc driver: Why it isn't jdbcCompliant? Gunnar R|nning <gunnar@candleweb.no>
0 siblings, 1 reply; 7+ messages in thread
From: Joseph Shraibman @ 2000-05-29 18:50 UTC (permalink / raw)
To: Gunnar R|nning <gunnar@candleweb.no>; +Cc: Janossy Gergely <gjano@freemail.hu>; pgsql-interfaces
Gunnar R|nning wrote:
>
> Janossy Gergely <gjano@freemail.hu> writes:
>
> > Hi!
> >
> > I'm using Sun JDK 1.2.2 and tried to use the pgsql interface with postgresql
> > 6.x and 7.0 as well. I couldn't use any of the interfaces because
> > the method Driver.jdbcCompliant() is always false. Even with mysql driver.
>
> Hi Janossy,
>
> I guess this only means that the driver doesn't implement all the
> interfaces according to the JDBC specification. But it works fine for most
> applications as long you not are depending on esoteric(or special)
> features. In fact I'm very satisfied with it for an JDBC based web application
> I ported this week to PostgreSQL. I'm also running Sun JDK 1.2.2 as you do.
>
> regards,
> Gunnar
From the Driver source code:
/**
* Report whether the driver is a genuine JDBC compliant driver. A
* driver may only report "true" here if it passes the JDBC compliance
* tests, otherwise it is required to return false. JDBC compliance
* requires full support for the JDBC API and full support for SQL 92
* Entry Level.
*
* <p>For PostgreSQL, this is not yet possible, as we are not SQL92
* compliant (yet).
*/
public boolean jdbcCompliant()
{
return false;
}
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: jdbc driver: Why it isn't jdbcCompliant?
2000-05-26 23:26 jdbc driver: Why it isn't jdbcCompliant? Janossy Gergely <gjano@freemail.hu>
2000-05-28 10:42 ` Re: jdbc driver: Why it isn't jdbcCompliant? Gunnar R|nning <gunnar@candleweb.no>
2000-05-29 18:50 ` Re: jdbc driver: Why it isn't jdbcCompliant? Joseph Shraibman <jks@selectacast.net>
@ 2000-05-29 23:23 ` Gunnar R|nning <gunnar@candleweb.no>
2000-05-30 02:36 ` Re: jdbc driver: Why it isn't jdbcCompliant? Joseph Shraibman <jks@selectacast.net>
0 siblings, 1 reply; 7+ messages in thread
From: Gunnar R|nning @ 2000-05-29 23:23 UTC (permalink / raw)
To: Joseph Shraibman <jks@selectacast.net>; +Cc: Janossy Gergely <gjano@freemail.hu>; pgsql-interfaces
Joseph Shraibman <jks@selectacast.net> writes:
Yes - your point being ? I think that you will find that most JDBC drivers
out there do not implement the spec. to the letter. But using good OO
design principles and adapters you can easily use a subset of the spec(plus
your favorite non SQL 92 database extensions) together with appropriate
adaptors to keep things fairly easy to port between databases. The four
databases that I know best Sybase ASE, PosgreSQL, Progress V9.1 and MySQL
do not fully implement the JDBC spec. But then again I think SQL 92 is the
same story...
Regards,
Gunnar
> >From the Driver source code:
> public boolean jdbcCompliant()
> {
> return false;
> }
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: jdbc driver: Why it isn't jdbcCompliant?
2000-05-26 23:26 jdbc driver: Why it isn't jdbcCompliant? Janossy Gergely <gjano@freemail.hu>
2000-05-28 10:42 ` Re: jdbc driver: Why it isn't jdbcCompliant? Gunnar R|nning <gunnar@candleweb.no>
2000-05-29 18:50 ` Re: jdbc driver: Why it isn't jdbcCompliant? Joseph Shraibman <jks@selectacast.net>
2000-05-29 23:23 ` Re: jdbc driver: Why it isn't jdbcCompliant? Gunnar R|nning <gunnar@candleweb.no>
@ 2000-05-30 02:36 ` Joseph Shraibman <jks@selectacast.net>
0 siblings, 0 replies; 7+ messages in thread
From: Joseph Shraibman @ 2000-05-30 02:36 UTC (permalink / raw)
To: Gunnar R|nning <gunnar@candleweb.no>; +Cc: Janossy Gergely <gjano@freemail.hu>; pgsql-interfaces
I wasn't making a point. I was just including the comment from the
source code to tell why jdbcCompliant() returns false, namely that
postgresql isn't sql 92 compliant.
Gunnar R|nning wrote:
>
> Joseph Shraibman <jks@selectacast.net> writes:
>
> Yes - your point being ? I think that you will find that most JDBC drivers
> out there do not implement the spec. to the letter. But using good OO
> design principles and adapters you can easily use a subset of the spec(plus
> your favorite non SQL 92 database extensions) together with appropriate
> adaptors to keep things fairly easy to port between databases. The four
> databases that I know best Sybase ASE, PosgreSQL, Progress V9.1 and MySQL
> do not fully implement the JDBC spec. But then again I think SQL 92 is the
> same story...
>
> Regards,
>
> Gunnar
>
> > >From the Driver source code:
>
> > public boolean jdbcCompliant()
> > {
> > return false;
> > }
^ permalink raw reply [nested|flat] 7+ messages in thread
* RE: jdbc driver: Why it isn't jdbcCompliant?
@ 2000-05-30 07:24 Peter Mount <petermount@it.maidstone.gov.uk>
0 siblings, 0 replies; 7+ messages in thread
From: Peter Mount @ 2000-05-30 07:24 UTC (permalink / raw)
To: 'Janossy Gergely' <gjano@freemail.hu>; pgsql-interfaces
jdbcCompliant() will always return false as it's hardwired to do so.
It does this because we don't yet support the minimum facilities required
before we can set it. CallableStatement is one good example.
Is it your own code that's requiring it to be set, or someone elses classes?
Peter
--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.
-----Original Message-----
From: Janossy Gergely [mailto:gjano@freemail.hu]
Sent: Saturday, May 27, 2000 12:27 AM
To: pgsql-interfaces@postgresql.org
Subject: [INTERFACES] jdbc driver: Why it isn't jdbcCompliant?
Hi!
I'm using Sun JDK 1.2.2 and tried to use the pgsql interface with postgresql
6.x and 7.0 as well. I couldn't use any of the interfaces because
the method Driver.jdbcCompliant() is always false. Even with mysql driver.
I used a little test program:
if (evt.getSource()==registerButton) {
try {
Driver d=(Driver)Class.forName(driver.getText()).newInstance();
kiir("Registered driver: "+driver.getText());
kiir("Verzio: "+d.getMajorVersion()+"."+d.getMinorVersion());
String s;
if (!d.jdbcCompliant()) s=" not ";
else s=" ";
kiir("This driver is "+s+"JDBC-compliant");
} catch (Exception e) {
hiba("Registration failed", e);
}
where driver.Gettext is the path of the postgres driver (org.postgres.Driver
i think.)
Thanx for your help
Greg.
^ permalink raw reply [nested|flat] 7+ messages in thread
* RE: jdbc driver: Why it isn't jdbcCompliant?
@ 2000-05-30 08:57 Peter Mount <petermount@it.maidstone.gov.uk>
0 siblings, 0 replies; 7+ messages in thread
From: Peter Mount @ 2000-05-30 08:57 UTC (permalink / raw)
To: 'Joseph Shraibman' <jks@selectacast.net>; Gunnar R|nning <gunnar@candleweb.no>; +Cc: Janossy Gergely <gjano@freemail.hu>; pgsql-interfaces
I think the comment in thr source needs to be updated, as it's not that
accurate now.
There's two sides to the problem, the main one is that we don't yet fully
support all the necessary methods required for compliancy (which is what the
tests check). Also CallableStatement has never been implemented (it's just a
stub at the moment), and were only just starting on implementing the ODBC
style escape syntax.
The SQL92 reference is so that simple queries can be written, and they will
work for all compliant drivers without changing the calling code.
Peter
--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.
-----Original Message-----
From: Joseph Shraibman [mailto:jks@selectacast.net]
Sent: Tuesday, May 30, 2000 3:36 AM
To: Gunnar R|nning
Cc: Janossy Gergely; pgsql-interfaces@postgresql.org
Subject: Re: [INTERFACES] jdbc driver: Why it isn't jdbcCompliant?
I wasn't making a point. I was just including the comment from the
source code to tell why jdbcCompliant() returns false, namely that
postgresql isn't sql 92 compliant.
Gunnar R|nning wrote:
>
> Joseph Shraibman <jks@selectacast.net> writes:
>
> Yes - your point being ? I think that you will find that most JDBC drivers
> out there do not implement the spec. to the letter. But using good OO
> design principles and adapters you can easily use a subset of the
spec(plus
> your favorite non SQL 92 database extensions) together with appropriate
> adaptors to keep things fairly easy to port between databases. The four
> databases that I know best Sybase ASE, PosgreSQL, Progress V9.1 and MySQL
> do not fully implement the JDBC spec. But then again I think SQL 92 is the
> same story...
>
> Regards,
>
> Gunnar
>
> > >From the Driver source code:
>
> > public boolean jdbcCompliant()
> > {
> > return false;
> > }
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2000-05-30 08:57 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-05-26 23:26 jdbc driver: Why it isn't jdbcCompliant? Janossy Gergely <gjano@freemail.hu>
2000-05-28 10:42 ` Gunnar R|nning <gunnar@candleweb.no>
2000-05-29 18:50 ` Joseph Shraibman <jks@selectacast.net>
2000-05-29 23:23 ` Gunnar R|nning <gunnar@candleweb.no>
2000-05-30 02:36 ` Joseph Shraibman <jks@selectacast.net>
2000-05-30 07:24 RE: jdbc driver: Why it isn't jdbcCompliant? Peter Mount <petermount@it.maidstone.gov.uk>
2000-05-30 08:57 RE: jdbc driver: Why it isn't jdbcCompliant? Peter Mount <petermount@it.maidstone.gov.uk>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox