From: | Kris Jurka <books(at)ejurka(dot)com> |
---|---|
To: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
Cc: | Sam Lawrence *EXTERN* <sam(at)fsbtech(dot)com>, pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: CallableStatement and getUpdateCount |
Date: | 2008-04-01 17:28:45 |
Message-ID: | Pine.BSO.4.64.0804011321280.10648@leary.csoft.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On Tue, 1 Apr 2008, Albe Laurenz wrote:
> Hmmm. getUpdateCount() is defined in
> org/postgresql/jdbc2/AbstractJdbc2Statement.java as
>
> if (isFunction)
> return 1;
>
I would guess that this code was conceived without regard to returning
sets. For code that does {? = call f()} you expect the caller to fetch
the result using CallableStatement.getXXX() so that's why the code isn't
indicating that a ResultSet is returned even though there is one under the
hood. The JDBC driver has no idea whether the function it's calling is
returning a SETOF or not, so it can't use that to determine what to return
for getUpdateCount.
Perhaps we can differentiate between calls of the form {call f()} and {? =
call f()} ?
Kris Jurka
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Smith | 2008-04-02 00:05:12 | Re: Re: [HACKERS] How embarrassing: optimization of a one-shot query doesn't work |
Previous Message | PFC | 2008-04-01 14:43:58 | Re: [HACKERS] How embarrassing: optimization of a one-shot query doesn't work |