Mm... let alone my patch but the 'Uses undefined contents of buf'
is not true (buf is initialized to contain all 0es:
111:memset(buf, 0, MAX_PROMPT_SIZE + 1);
And the 'Falls off the end of prompt string' is common to
all non-singlechar handlings (execute command, interpolate variable).
.. th
On Fri, Jan 14, 2005 at 12:06:32PM -0500, Tom Lane wrote:
> strk <[EMAIL PROTECTED]> writes:
> > A simple patch allow query output in psql PROMPT strings:
>
> Why is this a good idea? Having a query implicitly executed during
> every prompt will have a ton of bad side effects, for instance
> prem
strk <[EMAIL PROTECTED]> writes:
> A simple patch allow query output in psql PROMPT strings:
Why is this a good idea? Having a query implicitly executed during
every prompt will have a ton of bad side effects, for instance
prematurely freezing the query snapshot in SERIALIZABLE transactions.
The
A simple patch allow query output in psql PROMPT strings:
Index: prompt.c
===
RCS file: /projects/cvsroot/pgsql/src/bin/psql/prompt.c,v
retrieving revision 1.38
diff -U2 -r1.38 prompt.c
--- prompt.c1 Jan 2005 05:43:08 -