Prepared Statements

Поиск
Список
Период
Сортировка
От Patrick REED
Тема Prepared Statements
Дата
Msg-id CAJHg7sexKKMEvrsdn6kFqm8J9=Nku-NXnbV7GpJi3RiUWz9hcA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Prepared Statements
Re: Prepared Statements
Список 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 по дате отправления: