Host variable in subqueries - Mailing list pgsql-general

From Raginsky Alexander
Subject Host variable in subqueries
Date
Msg-id 9f0s55$bkf$1@news.huji.ac.il
Whole thread Raw
List pgsql-general
Hello
 We've got a question regarding the using of the host variables inside
 subquery in declaration of cursor. Is there any restriction about it? We
had
 problem in the following cursor:

   EXEC SQL DECLARE ACQ CURSOR FOR
   SELECT Id FROM
   (SELECT  SKey,CheckIn,CheckOut
   FROM Stayed
   WHERE Id= :given_id ) TheMan, Stayed
   WHERE TheMan.SKey=Stayed.SKey AND TheMan.CheckIn=Stayed.CheckIn AND
 TheMan.CheckOut=Stayed.CheckOut;

When we change :given_id to 9675467 (its real value) it works properly.
 Do you have any idea what the problem is?

Thanks in advance.
     Alexander & Yuri





pgsql-general by date:

Previous
From: "Stefan Scherf"
Date:
Subject: 7.1.2 faster then 7.1?
Next
From: Martin Weinberg
Date:
Subject: Help with: my bits moved right off the end of the world!