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

call syntax for record returning stored function

From: markw(at)osdl(dot)org
To: pgsql-jdbc(at)postgresql(dot)org
Subject: call syntax for record returning stored function
Date: 2004-03-22 18:00:19
Message-ID: 200403221800.i2MI0iE07396@mail.osdl.org (view raw or flat)
Thread:
Lists: pgsql-jdbc
I'm having a little trouble figuring out the call syntax for calling a
pl/pgsql stored function that returns a record with
Connection.prepareCall().  I'm not getting the column definition list
correct.  A pointer to an example would be great, or an example for
something like the following:

	CREATE OR REPLACE FUNCTION home (INTEGER, INTEGER)
		RETURNS RECORD AS '
	DECLARE
		c_fname CHAR(15);
		pp_i_id1 INTEGER;
		rec RECORD;
	BEGIN
		...
		SELECT c_fname::CHAR(15), pp_i_id1::INTEGER
		INTO rec;
		RETURN rec;
	END;
	' LANGUAGE 'plpgsql';
		
Thanks!
-- 
Mark Wong - - markw(at)osdl(dot)org
Open Source Development Lab Inc - A non-profit corporation
12725 SW Millikan Way - Suite 400 - Beaverton, OR 97005
(503) 626-2455 x 32 (office)
(503) 626-2436      (fax)
http://developer.osdl.org/markw/

Responses

pgsql-jdbc by date

Next:From: Paul ThomasDate: 2004-03-22 18:09:29
Subject: Re: Postmaster not dropping connections on tomcat restart.
Previous:From: dinakarDate: 2004-03-22 16:15:02
Subject: Re: Postmaster not dropping connections on tomcat restart.

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