Hi,
We ( me and my teammate ) try to write a graphical client in Java.
We made our first stable version ( pgInhaler.ifrance.com for ones who want
to try it ...) and we need some JDBC features for next version :
 - catch EXPLAIN plan
 - cancel QUERY
Is it possible ?

Suggestions and fellings about this project will be welcome.

Nicolas.


Thu, 22 Nov 2001 10:47:15 +0100
"Nicolas Verger" <nicolas@verger.net>
JDBC improvements
Nicolas,

AFAIK you should be able to get the EXPLAIN plan from the jdbc driver. 
All INFO messages from the backend are treated as warnings by the jdbc 
driver.  If you do a getWarnings() you should be able to get the explain 
plan information.

Cancel query is on the jdbc todo list.  However I don't know of anyone 
that plans to implement it.  So a patch that adds that functionality 
would be welcome.

thanks,
--Barry


Nicolas Verger wrote:

> Hi,
> We ( me and my teammate ) try to write a graphical client in Java.
> We made our first stable version ( pgInhaler.ifrance.com for ones who want
> to try it ...) and we need some JDBC features for next version :
>  - catch EXPLAIN plan
>  - cancel QUERY
> Is it possible ?
> 
> Suggestions and fellings about this project will be welcome.
> 
> Nicolas.
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
> http://www.postgresql.org/users-lounge/docs/faq.html
> 
> 



Mon, 26 Nov 2001 09:46:55 -0800
Barry Lind <barry@xythos.com>
Re: [HACKERS] JDBC improvements
> -----Message d'origine-----
> De : Barry Lind [mailto:barry@xythos.com]
> Nicolas,
>
> AFAIK you should be able to get the EXPLAIN plan from the jdbc driver.
> All INFO messages from the backend are treated as warnings by the jdbc
> driver.  If you do a getWarnings() you should be able to get the explain
> plan information.
>
> Cancel query is on the jdbc todo list.  However I don't know of anyone
> that plans to implement it.  So a patch that adds that functionality
> would be welcome.
>
> thanks,
> --Barry
>
>

Ok, the getWarnings() method works on the Connection but not on the Statment
nor ResultSet... Why ?
I look in the source and it's just a little patch to do it.
I'm not used in GPL licence so if I make this patch what may I do with it ?

I watched for cancel query too, and I may work on it too ...

Nicolas



Fri, 30 Nov 2001 18:02:30 +0100
"Nicolas Verger" <nicolas@verger.net>
Re: [HACKERS] JDBC improvements
Nicolas,

If you have a patch you want to submit, send it to the pgsql-patches 
mail list and cc the pgsql-jdbc mail list.  Given that we are very near 
the release of 7.2, it likely won't make it into 7.2 unfortunately.

thanks,
--Barry


Nicolas Verger wrote:

>>-----Message d'origine-----
>>De : Barry Lind [mailto:barry@xythos.com]
>>Nicolas,
>>
>>AFAIK you should be able to get the EXPLAIN plan from the jdbc driver.
>>All INFO messages from the backend are treated as warnings by the jdbc
>>driver.  If you do a getWarnings() you should be able to get the explain
>>plan information.
>>
>>Cancel query is on the jdbc todo list.  However I don't know of anyone
>>that plans to implement it.  So a patch that adds that functionality
>>would be welcome.
>>
>>thanks,
>>--Barry
>>
>>
>>
> 
> Ok, the getWarnings() method works on the Connection but not on the Statment
> nor ResultSet... Why ?
> I look in the source and it's just a little patch to do it.
> I'm not used in GPL licence so if I make this patch what may I do with it ?
> 
> I watched for cancel query too, and I may work on it too ...
> 
> Nicolas
> 
> 
> 



Fri, 30 Nov 2001 11:03:44 -0800
Barry Lind <barry@xythos.com>
Re: [HACKERS] JDBC improvements
Nicolas,

Just send your patch to the list and we will include it in version 7.3

Dave

-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Nicolas Verger
Sent: Friday, November 30, 2001 12:02 PM
To: Barry Lind
Cc: Psql-Hackers; pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] [HACKERS] JDBC improvements


> -----Message d'origine-----
> De : Barry Lind [mailto:barry@xythos.com]
> Nicolas,
>
> AFAIK you should be able to get the EXPLAIN plan from the jdbc driver.

> All INFO messages from the backend are treated as warnings by the jdbc

> driver.  If you do a getWarnings() you should be able to get the 
> explain plan information.
>
> Cancel query is on the jdbc todo list.  However I don't know of anyone

> that plans to implement it.  So a patch that adds that functionality 
> would be welcome.
>
> thanks,
> --Barry
>
>

Ok, the getWarnings() method works on the Connection but not on the
Statment nor ResultSet... Why ? I look in the source and it's just a
little patch to do it. I'm not used in GPL licence so if I make this
patch what may I do with it ?

I watched for cancel query too, and I may work on it too ...

Nicolas



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



Mon, 3 Dec 2001 13:45:10 -0500
"Dave Cramer" <Dave@micro-automation.net>
Re: [HACKERS] JDBC improvements
> > Cancel query is on the jdbc todo list.  However I don't know of anyone
> > that plans to implement it.  So a patch that adds that functionality
> > would be welcome.
> >
> > thanks,
> > --Barry
> >
> >
> 
> Ok, the getWarnings() method works on the Connection but not on the Statment
> nor ResultSet... Why ?
> I look in the source and it's just a little patch to do it.
> I'm not used in GPL licence so if I make this patch what may I do with it ?
> 
> I watched for cancel query too, and I may work on it too ...

We are BSD license.  Is that what you meant?  Sure, send it over to jdbc
list or patches list.

-- 
  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

Mon, 3 Dec 2001 13:45:16 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] JDBC improvements
> > Ok, the getWarnings() method works on the Connection but not on
> the Statment
> > nor ResultSet... Why ?
> > I look in the source and it's just a little patch to do it.
> > I'm not used in GPL licence so if I make this patch what may I
> do with it ?
> >
> > I watched for cancel query too, and I may work on it too ...
>
> We are BSD license.  Is that what you meant?  Sure, send it over to jdbc
> list or patches list.

Ok, so I send the first patch. It correct the propagation of the SQLWarnings
to the Statement and the ResultSet

Change are :
Add method addWarnings(SQLWarning) into org.postgresql.ResultSet
Add method addWarning(String) into org.postgresql.Statement
Modify method execute() into org.postgresql.core.QueryExecutor
	- Clear the warning of the current statement before process the query
	- Set the new warnings to the statement too
	- Add the statement warning to the ResultSet when the query is processed
Fri, 7 Dec 2001 10:45:05 +0100
"Nicolas Verger" <nicolas@verger.net>
Patch : Re: JDBC improvements

I will keep this and apply for 7.3.  Thanks.


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

> > > Ok, the getWarnings() method works on the Connection but not on
> > the Statment
> > > nor ResultSet... Why ?
> > > I look in the source and it's just a little patch to do it.
> > > I'm not used in GPL licence so if I make this patch what may I
> > do with it ?
> > >
> > > I watched for cancel query too, and I may work on it too ...
> >
> > We are BSD license.  Is that what you meant?  Sure, send it over to jdbc
> > list or patches list.
> 
> Ok, so I send the first patch. It correct the propagation of the SQLWarnings
> to the Statement and the ResultSet
> 
> Change are :
> Add method addWarnings(SQLWarning) into org.postgresql.ResultSet
> Add method addWarning(String) into org.postgresql.Statement
> Modify method execute() into org.postgresql.core.QueryExecutor
> 	- Clear the warning of the current statement before process the query
> 	- Set the new warnings to the statement too
> 	- Add the statement warning to the ResultSet when the query is processed
> 

[ Attachment, skipping... ]

[ Attachment, skipping... ]

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly

-- 
  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

Tue, 11 Dec 2001 21:12:12 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: Patch : Re: JDBC improvements
hi all,

what is the java.sql matching type for an psql  "interval" type ? And what
flavor of getXXX method of Resultset is used to retrieve a data of such a
type ?

Thanx for your help

--hermann


Fri, 14 Dec 2001 10:50:54 +0100
"Hermann RANGAMANA" <hrangamana@primagendys.fr>
psql interval type

Just send over the patch and we will add it for 7.3.

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

Nicolas Verger wrote:
> > -----Message d'origine-----
> > De : Barry Lind [mailto:barry@xythos.com]
> > Nicolas,
> >
> > AFAIK you should be able to get the EXPLAIN plan from the jdbc driver.
> > All INFO messages from the backend are treated as warnings by the jdbc
> > driver.  If you do a getWarnings() you should be able to get the explain
> > plan information.
> >
> > Cancel query is on the jdbc todo list.  However I don't know of anyone
> > that plans to implement it.  So a patch that adds that functionality
> > would be welcome.
> >
> > thanks,
> > --Barry
> >
> >
> 
> Ok, the getWarnings() method works on the Connection but not on the Statment
> nor ResultSet... Why ?
> I look in the source and it's just a little patch to do it.
> I'm not used in GPL licence so if I make this patch what may I do with it ?
> 
> I watched for cancel query too, and I may work on it too ...
> 
> Nicolas
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 

-- 
  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

Fri, 22 Feb 2002 19:26:06 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: JDBC improvements

Your patch has been added to the PostgreSQL unapplied patches list at:

	http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

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


Nicolas Verger wrote:
> > > Ok, the getWarnings() method works on the Connection but not on
> > the Statment
> > > nor ResultSet... Why ?
> > > I look in the source and it's just a little patch to do it.
> > > I'm not used in GPL licence so if I make this patch what may I
> > do with it ?
> > >
> > > I watched for cancel query too, and I may work on it too ...
> >
> > We are BSD license.  Is that what you meant?  Sure, send it over to jdbc
> > list or patches list.
> 
> Ok, so I send the first patch. It correct the propagation of the SQLWarnings
> to the Statement and the ResultSet
> 
> Change are :
> Add method addWarnings(SQLWarning) into org.postgresql.ResultSet
> Add method addWarning(String) into org.postgresql.Statement
> Modify method execute() into org.postgresql.core.QueryExecutor
> 	- Clear the warning of the current statement before process the query
> 	- Set the new warnings to the statement too
> 	- Add the statement warning to the ResultSet when the query is processed
> 

[ Attachment, skipping... ]

[ Attachment, skipping... ]

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly

-- 
  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

Fri, 22 Feb 2002 19:31:41 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: Patch : Re: JDBC improvements