> What statements? Sorry. Statements is my code. > What problem are you trying to solve? I want know how I make to use a prepared plan ( http://www.postgresql.org/docs/8.1/static/sql-prepare.html ). I read that I need to use the SPI_PREPARE and SPI_EXEC in my code, but I didn't understand how make it. Thanks