Hi Tom,
Well actually it worked via java now.
But I am really interested in what you said about first call.
I am creating the temp_accomm table everytime I call the function and drop
it in the end.
Let me explain the functionality. I need to get the result of a query which
joins 4 tables. The problem is because of this join I get more than one
record for one accomodation which is fine as there are multiple child images
for a accomm. What I have to do is concatenate the column of image table and
return in the resultset.
The out put looks like this
412|Hotel Cristallo|0|0|901#902|r82h06.jpg#r82h06.jpg|Hotel Cristallo#Hotel
Cristallo
413|Campo Smith Village|0|0|903#904|r83a06.jpg#r83a06.jpg|Campo Smith
Village and Great Western Hotel Rive#Campo Smith Village and Great Western
Hotel Rive
Do you still see any problem here.
One more thing in MS-SQL I used to create temp table using #. How can I do
that here in postgres?
Thanks
Bhushan
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: 02 March 2004 15:16
To: Bhushan Bhangale
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] calling function
Bhushan Bhangale <bbhangale@Lastminute.com> writes:
> Error: ERROR: relation with OID 659490 does not exist (State:S1000,
Native
> Code: 7)
That function is only going to work once per session, because plpgsql
caches query plans. After the first call, the commands in the loop will
refer to a version of temp_accomm that doesn't exist anymore.
AFAICS you do not actually need the temp_accum table anyway. Why don't
you just return the data directly from the main loop?
regards, tom lane
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________