pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedSupport for named parameters in the PostgreSQL JDBC driver
4+ messages / 3 participants
[nested] [flat]
* Support for named parameters in the PostgreSQL JDBC driver
@ 2006-11-16 06:29 Ravi Periasamy <rperiasamy@aol.com>
0 siblings, 2 replies; 4+ messages in thread
From: Ravi Periasamy @ 2006-11-16 06:29 UTC (permalink / raw)
To: pgsql-jdbc; jdb_switcher_dev <jdb_switcher_dev@LISTSERV.SUP.AOL.COM>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Dear PGSQL-JDBC Team,<br>
<br>
Could you please let me know if the support for "<i>Named Parameters</i>"
in the JDBC driver is slated for some future release?<br>
<br>
Currently with the 8.1.4 JDBC driver, the call to <i>CallableStatement.setString(String,
String) </i>fails and the <a
href="http://developer.postgresql.org/cvsweb.cgi/%7Echeckout%7E/pgsql/src/interfaces/jdbc/org/postgresql/j...
</a>is throwing the following exception - <br>
<br>
"Caused by: org.postgresql.util.PSQLException: Method
org.postgresql.jdbc3.Jdbc3CallableStatement.setString(String,String) is
not yet implemented."<br>
<br>
Thanks<br>
Ravi<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Support for named parameters in the PostgreSQL JDBC driver
@ 2006-11-16 12:21 Dave Cramer <pg@fastcrypt.com>
parent: Ravi Periasamy <rperiasamy@aol.com>
1 sibling, 0 replies; 4+ messages in thread
From: Dave Cramer @ 2006-11-16 12:21 UTC (permalink / raw)
To: rperiasamy@aol.com; +Cc: pgsql-jdbc; jdb_switcher_dev <jdb_switcher_dev@LISTSERV.SUP.AOL.COM>
Ravi,
The backend does not support named parameters, so I doubt this will
be coming anytime soon.
Dave
On 16-Nov-06, at 1:29 AM, Ravi Periasamy wrote:
> Dear PGSQL-JDBC Team,
>
> Could you please let me know if the support for "Named Parameters"
> in the JDBC driver is slated for some future release?
>
> Currently with the 8.1.4 JDBC driver, the call to
> CallableStatement.setString(String, String) fails and the code is
> throwing the following exception -
>
> "Caused by: org.postgresql.util.PSQLException: Method
> org.postgresql.jdbc3.Jdbc3CallableStatement.setString
> (String,String) is not yet implemented."
>
> Thanks
> Ravi
>
>
>
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Support for named parameters in the PostgreSQL JDBC driver
@ 2006-11-16 17:52 Kris Jurka <books@ejurka.com>
parent: Ravi Periasamy <rperiasamy@aol.com>
1 sibling, 1 reply; 4+ messages in thread
From: Kris Jurka @ 2006-11-16 17:52 UTC (permalink / raw)
To: Ravi Periasamy <rperiasamy@aol.com>; +Cc: pgsql-jdbc; jdb_switcher_dev <jdb_switcher_dev@LISTSERV.SUP.AOL.COM>
On Thu, 16 Nov 2006, Ravi Periasamy wrote:
> Dear PGSQL-JDBC Team,
>
> Could you please let me know if the support for "Named Parameters" in the
> JDBC driver is slated for some future release?
>
Just recently I noticed an overlooked patch that implements this:
http://archives.postgresql.org/pgsql-jdbc/2006-07/msg00011.php
The suggested patch isn't quite right, but its approach can work in many
cases. If functions are not overloaded then a simple lookup of parameter
names by the function name would work. If the function is overloaded we
might be able to use the parameter type given by setXXX to try and
determine what function we're actually calling, but it's probably better
to just error out in that case.
Kris Jurka
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Support for named parameters in the PostgreSQL JDBC driver
@ 2006-11-16 23:28 Dave Cramer <pg@fastcrypt.com>
parent: Kris Jurka <books@ejurka.com>
0 siblings, 0 replies; 4+ messages in thread
From: Dave Cramer @ 2006-11-16 23:28 UTC (permalink / raw)
To: Kris Jurka <books@ejurka.com>; +Cc: Ravi Periasamy <rperiasamy@aol.com>; pgsql-jdbc; jdb_switcher_dev <jdb_switcher_dev@LISTSERV.SUP.AOL.COM>
The patch looks promising, however my gut reaction to this is that
until it's supported by the protocol this will break more often than
it will work. On top of that named parameters are not part of the SQL
spec.
Dave
On 16-Nov-06, at 12:52 PM, Kris Jurka wrote:
>
>
> On Thu, 16 Nov 2006, Ravi Periasamy wrote:
>
>> Dear PGSQL-JDBC Team,
>> Could you please let me know if the support for "Named Parameters"
>> in the
>> JDBC driver is slated for some future release?
>>
>
> Just recently I noticed an overlooked patch that implements this:
> http://archives.postgresql.org/pgsql-jdbc/2006-07/msg00011.php
>
> The suggested patch isn't quite right, but its approach can work in
> many cases. If functions are not overloaded then a simple lookup
> of parameter names by the function name would work. If the
> function is overloaded we might be able to use the parameter type
> given by setXXX to try and determine what function we're actually
> calling, but it's probably better to just error out in that case.
>
> Kris Jurka
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2006-11-16 23:28 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-11-16 06:29 Support for named parameters in the PostgreSQL JDBC driver Ravi Periasamy <rperiasamy@aol.com>
2006-11-16 12:21 ` Dave Cramer <pg@fastcrypt.com>
2006-11-16 17:52 ` Kris Jurka <books@ejurka.com>
2006-11-16 23:28 ` Dave Cramer <pg@fastcrypt.com>
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