metdos
metdos

Reputation: 13929

Select without prepared statements in perl

My database does not support prepared statements, is there any way to run select query on this database without prepare statements in perl?

Code Snippet:

my $query = $conn->prepare("select a, b from my_table");
$query->execute();

Error:

DBD::Pg::st execute failed: ERROR:  cannot execute PREPARE

Upvotes: 2

Views: 1122

Answers (1)

AKHolland
AKHolland

Reputation: 4445

Try $conn->{'pg_server_prepare'} = 0 to disable server-side prepared statements.

Upvotes: 5

Related Questions