From: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
---|---|
To: | Greg Sabino Mullane <greg(at)turnstep(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Weird prepared stmt behavior |
Date: | 2004-05-03 15:49:53 |
Message-ID: | 20040503154953.GA30007@dcc.uchile.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, May 01, 2004 at 10:16:56PM -0000, Greg Sabino Mullane wrote:
> > We could imagine that once we add tracking of plan dependencies,
> > detection of a change that invalidates a prepared statement's plan
> > would just cause the prepared statement to be marked as "needs
> > recompilation". The next attempt to use it would have to re-plan
> > from source, and could get an error if there is no longer any valid
> > interpretation of the original source string.
>
> I am very uneasy about this. Statements should stay invalidated, else
> the prepared statement may no longer even do what was originally
> intended when it was first created.
OTOH, Oliver Jowett said on the JDBC list that the JDBC driver would
like to have a mechanism to non-transactionally create prepared
statements
(http://archives.postgresql.org/pgsql-jdbc/2004-05/msg00000.php)
A possible compromise is what Tom said originally: we could just have
the PREPARE command statements be discarded at rollback, but the Prepare
message's statements should be kept.
--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Now I have my system running, not a byte was off the shelf;
It rarely breaks and when it does I fix the code myself.
It's stable, clean and elegant, and lightning fast as well,
And it doesn't cost a nickel, so Bill Gates can go to hell."
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-05-03 16:03:47 | Re: Fixed directory locations in installs |
Previous Message | Philip Warner | 2004-05-03 15:40:45 | Re: ANALYZE locks pg_listener in EXCLUSIVE for long |