From: | "thomas(dot)risberg" <thomas(dot)risberg(at)tridb(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: getProcedureColumns |
Date: | 2007-07-02 18:31:26 |
Message-ID: | 11399288.post@talk.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Thanks Kris. I'll keep an eye on the 8.3dev drivers.
A related question - I have the following proc declaration:
create function my_proc(in_text in varchar, in_number in numeric, out_result
out varchar, out_text out varchar) RETURNS record
Since there are multiple out parameters it seemed as if I was forced to
declare the return as a record. Is this assumption correct?
Looking at the metadata for this proc I see:
- my_proc 5 1111 record
- my_proc 1 12 varchar
- my_proc 1 2 numeric
but this doesn't seem to be enough tp actually build the call statement and
executing the proc. Using con.prepareCall("{? = call my_proc(?, ?)}") - I
get org.postgresql.util.PSQLException: A CallableStatement was excecuted
with an invalid number of parameters.
Switching to con.prepareCall("{? = call my_proc(?, ?, ?)}") I can get it to
work but only by registering two out parameters of Types.VARCHAR. So it
seems that it is not possible to construct the appropriate call sequence
just based on the metadata when there are multiple out parameters.
Any insights are appreciated.
Thanks,
Thomas Risberg
Kris Jurka wrote:
>
>
>
> On Mon, 2 Jul 2007, thomas.risberg wrote:
>
>> Did this patch ever make it into the codebase? I'm interested in getting
>> the actual names declared when the function was declared rather than the
>> $x
>> placeholders. Currently testing with postgresql-8.2-505.jdbc3.jar and
>> this
>> change doesn't seem to be in there.
>>
>
> It has not made it into the driver yet because I haven't done the testing
> against all our supported server versions yet. In any case it will not
> appear in the 8.2 series release because it is a new feature and will
> instead appear in the 8.3 release.
>
> Kris Jurka
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
>
--
View this message in context: http://www.nabble.com/getProcedureColumns-tf3147414.html#a11399288
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Kris Jurka | 2007-07-02 18:52:30 | Re: getProcedureColumns |
Previous Message | Kris Jurka | 2007-07-02 17:36:55 | Re: getProcedureColumns |