Skip site navigation (1) Skip section navigation (2)

Re: receiving user defined types from a function?

From: Kris Jurka <books(at)ejurka(dot)com>
To: Dario Bahena Tapia <dario(at)ciencias(dot)unam(dot)mx>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: receiving user defined types from a function?
Date: 2004-03-26 21:31:34
Message-ID: Pine.BSO.4.56.0403261629490.3597@leary.csoft.net (view raw or flat)
Thread:
Lists: pgsql-interfaces

On Tue, 23 Mar 2004, Dario Bahena wrote:

> hi ...
> 
> I've a postgresql function, that returns a user defined composite type, 
> is it posible to catch it using the jdbc driver???, cause then I tried 
> it and saw the class for the object, it gave me just the first member 
> for my composite type.
> 

Instead of using a CallableStatement to call a function returning a
complex type the recommended method is to use a regular Statement or
PreparedStatement and simply call the function in a select such as:

SELECT * FROM mycomplexfunction('a',12);

Kris Jurka

In response to

pgsql-interfaces by date

Next:From: Peter EisentrautDate: 2004-03-26 21:46:50
Subject: Re: PostgreSQL-Perl Interface installation
Previous:From: J├╝rgen CappelDate: 2004-03-26 12:26:28
Subject: ECPG segfault

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group