Search Postgresql Archives

plpgsql question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



v8.3.4 on linux

 

Is there a way to set the query used in a "for rec in (query) loop -> end loop" be a variable?  Example

 

if (foo = 'whatever')

then

  sqlstmt := "select x,y,z ...";

else

  sqlstmt := "select a,b,c ...";

end if ;

 

for therec in

  sqlstmt

loop

    ...

end loop;

 

 

Thanks in Advance for any help. 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux