pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Functions returning SETs and CallableStatment Interface
2+ messages / 2 participants
[nested] [flat]

* Functions returning SETs and CallableStatment Interface
@ 2015-08-22 16:25 Thomas Hill <Thomas.K.Hill@t-online.de>
  2015-08-26 22:37 ` Re: Functions returning SETs and CallableStatment Interface Dave Cramer <pg@fastcrypt.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Thomas Hill @ 2015-08-22 16:25 UTC (permalink / raw)
  To: pgsql-jdbc

Hi,

I would like a Java program that can be run in conjunction with an 
Apache Database Server and an Oracle server to also run using postgresql 
as backend. The program is using stored procedures and the 
callableStatement interface for "all" database communication.

If I understand the following statement from the documentation 
correctly, this means my code will not work when dealing with stored 
procedures returning restultsets.
"Functions that return data as a set should not be called via the 
|CallableStatement| interface, but instead should use the normal 
|Statement| or |PreparedStatement| interfaces."

So I was wondering if there are any plans for an implementation that 
allows using the callableStatement interface also for functions 
returning sets?

Thanks
Thomas

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Functions returning SETs and CallableStatment Interface
  2015-08-22 16:25 Functions returning SETs and CallableStatment Interface Thomas Hill <Thomas.K.Hill@t-online.de>
@ 2015-08-26 22:37 ` Dave Cramer <pg@fastcrypt.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Dave Cramer @ 2015-08-26 22:37 UTC (permalink / raw)
  To: Thomas Hill <Thomas.K.Hill@t-online.de>; +Cc: pgsql-jdbc

Hi Thomas,

Not really, stored procedures in postgresql aren't really stored procedures
rather functions and are called by doing select funcname() ...

Dave

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

On 22 August 2015 at 12:25, Thomas Hill <Thomas.K.Hill@t-online.de> wrote:

> Hi,
>
> I would like a Java program that can be run in conjunction with an Apache
> Database Server and an Oracle server to also run using postgresql as
> backend. The program is using stored procedures and the callableStatement
> interface for "all" database communication.
>
> If I understand the following statement from the documentation correctly,
> this means my code will not work when dealing with stored procedures
> returning restultsets.
> "Functions that return data as a set should not be called via the
> CallableStatement interface, but instead should use the normal Statement
> or PreparedStatement interfaces."
>
> So I was wondering if there are any plans for an implementation that
> allows using the callableStatement interface also for functions returning
> sets?
>
> Thanks
> Thomas
>

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2015-08-26 22:37 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-08-22 16:25 Functions returning SETs and CallableStatment Interface Thomas Hill <Thomas.K.Hill@t-online.de>
2015-08-26 22:37 ` 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