Home > Archive > PostgreSQL JDBC > November 2005 > name value pairs









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author name value pairs
Srivats

2005-11-04, 3:24 am

Hi,

Can I call the functions with name value pairs from JAVA like i do in
Sybase.
For Example
function name ( variable name = value, ..... );

variable name as declared inside the function


Thks
Srivats.C


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

Kris Jurka

2005-11-08, 4:12 pm



On Fri, 4 Nov 2005, Srivats wrote:

> Can I call the functions with name value pairs from JAVA like i do in Sybase.
> For Example
> function name ( variable name = value, ..... );


The CallableStatement interface provides setXXX methods that take a String
argument for the parameter name in addition to the integer offset setXXX
methods. Unfortunately the postgresql jdbc driver currently does not
implement these methods.

It would be possible to implement this method by parsing the statement and
then querying the system catalog to get the function parameters' names.
This wouldn't work for overloaded functions which need additional type
information to resolve, but I don't think that's the general case.

Kris Jurka

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com