Problem with the result set of postgres

From: "Sandeep Chibber" <sandeep(at)vreach(dot)net>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Problem with the result set of postgres
Date: 2002-05-27 07:22:47
Message-ID: 000f01c2054f$4d79ac10$1302a8c2@multicast.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi
I am listing out the problem I am facing while EXECUTING the function .

create table newtest (name varchar(50), address varchar(50))

CREATE FUNCTION newtestfunc () RETURNS setof varchar AS
'SELECT name,address FROM newtest'
LANGUAGE 'SQL';

select newtestfunc()

The output is 168269272 ,
in this table there are two records and the output is also coming twice There is no change in the number 168269272 ,168269272

Please guide me how to get the result set through a java bean

My Requirement :

1.I want to retrieve multiple records from the table using function. The function call will come from the java bean.
2. The table will have different datatypes.

Thanks

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Achilleus Mantzios 2002-05-27 12:00:16 Re: Trees in SQL
Previous Message Christopher Kings-Lynne 2002-05-27 01:35:53 Re: uinique identifier