Prepared Statements - Mailing list pgsql-hackers

From Patrick REED
Subject Prepared Statements
Date
Msg-id CAJHg7sexKKMEvrsdn6kFqm8J9=Nku-NXnbV7GpJi3RiUWz9hcA@mail.gmail.com
Whole thread Raw
Responses Re: Prepared Statements
Re: Prepared Statements
List pgsql-hackers
Hi,

I am having a hard time pinning down which function creates a prepared statement. Say in some language I create a Prepared Statement and send it off. Before the first time I execute the prepared statement, which function is the one that 'creates' the prepared statement. In other words, which function stores it. I know that StorePreparedStatement will cache it, but is there anything else.

e.g.
In your favorite language:

String statement = "Insert into table_one values 10";
PreparedStatement insert = con.prepareStatement(statement);
insert.execute()
The very first time, does it store this just in the plancache or does it do something different to 'know' it has stored a Prepared Statement, so next time it will invoke it.

Thanks,
Patrick

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Support for NSS as a libpq TLS backend
Next
From: James Coleman
Date:
Subject: Re: enable_incremental_sort changes query behavior