Note that this is very stripped version of the real script, but it gives the same errors:
ERROR: prepared statement "test_statement" does not exist
I persume that this is caused because of the individual statements, each using their own session. But is there a way to avoid this?
In reality the statement that is prepared is much more complex, and the files that are processed are rather big. I hoped to gain more performance by preparing the statement.
Your sincerely,
Aarjan Langereis
Ps. The bash script is ran on an Fedora Core 3 machine using PostgreSQL 8.1.0