Search Postgresql Archives

Re: plpgsql and schema

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

 



On Wed, Jun 22, 2005 at 06:50:40PM +0200, Roberto Pellagatti wrote:
>
> The problem is that i get always the number of  rows from the table in 
> the schema that was current when I created the function.

PL/pgSQL caches its query plans, so subsequent calls to the function
use the plan created on the first call.  You can avoid this plan
caching by using EXECUTE.

http://www.postgresql.org/docs/8.0/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN

Note what the documentation says about not being able to get the
result of an EXECUTE query directly.  A couple of workarounds are
mentioned.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[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