postgres.git / summary / log / commit / refs

commit    b66c4fb322b21a57c0b05cd3bd89c49def654eae
Author:   Itagaki Takahiro <itagaki.takahiro@gmail.com>
Date:     Tue Sep 28 05:26:03 2010 +0000
First released in: 9.1.0, 8.3.12, 8.4.5, 9.0.1

    Add DISCARD to the command_no_begin list for AUTOCOMMIT=off.
    Backpatch to 8.3.
    
    Reported by Sergey Burladyan.


src/bin/psql/common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c index c482707e151..c8fc085fa04 100644 --- a/src/bin/psql/common.c +++ b/src/bin/psql/common.c @@ -1369,6 +1369,9 @@ command_no_begin(const char *query) return true; } + if (wordlen == 7 && pg_strncasecmp(query, "discard", 7) == 0) + return true; + return false; } [parent: 78b0a0d8c026]