Re: first time hacker ;) messing with prepared statements

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joris Dobbelsteen <joris(at)familiedobbelsteen(dot)nl>
Cc: PFC <lists(at)peufeu(dot)com>, James Mansion <james(at)mansionfamily(dot)plus(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: first time hacker ;) messing with prepared statements
Date: 2008-03-30 21:09:17
Message-ID: 28827.1206911357@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Joris Dobbelsteen <joris(at)familiedobbelsteen(dot)nl> writes:
> The MAJOR benefit of Microsoft's approach is that it works on existing
> application, and, most importantly makes NO assumptions on the
> "volatile" server state. A few cases where the Microsoft solution works,
> while yours will fail is:

> * Server restart and assorted like failover (you need to redo a
> global prepare).

Hmm? He's proposing storing the info in a system catalog. That hardly
seems "volatile"; it'll certainly survive a server restart.

> * Cleanup and instantiation of a prepared statement.

Again, it's not clear what you've got in mind.

I agree with the point that this isn't completely transparent to
applications, but if an app is already using named prepared statements
it would surely be a pretty small matter to make it use this feature.
The app code would likely get simpler instead of more complex, since
you'd stop worrying about whether a given statement had been prepared
yet in the current session.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-03-30 21:34:21 Re: Connection to PostgreSQL Using Certificate: Wrong Permissions on Private Key File
Previous Message Tom Lane 2008-03-30 21:04:30 Re: Patch : Global Prepared Statements