Hi, I'm trying to get an answer from a dynamic query using perform. The problem is that it sets the FOUND variable to true even when performing bogus queries. Am I missing something here? The documentation says that PERFORM only sets FOUND to true if it finds and discards a row but doing something like: qry := 'SELECT notafield FROM notatable' PERFORM qry Also sets FOUND to true, even more using a query like 'BLABLABLA' also set found to true. What am I doing wrong here? Thanks for any help in advance, Martin
Martin Brommer <martin@brommer.nl> writes:
> qry := 'SELECT notafield FROM notatable'
> PERFORM qry
> Also sets FOUND to true, even more using a query like 'BLABLABLA' also
> set found to true.
I think you are looking for EXECUTE, not PERFORM. The above only
confirms that indeed "qry" is a scalar variable --- its contents
are not examined.
regards, tom lane
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера