File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -456,14 +456,19 @@ MainLoop(FILE *source)
456
456
} /* while !endoffile/session */
457
457
458
458
/*
459
- * Process query at the end of file without a semicolon
459
+ * If we have a non-semicolon-terminated query at the end of file, we
460
+ * process it unless the input source is interactive --- in that case it
461
+ * seems better to go ahead and quit. Also skip if this is an error exit.
460
462
*/
461
463
if (query_buf -> len > 0 && !pset .cur_cmd_interactive &&
462
464
successResult == EXIT_SUCCESS )
463
465
{
464
466
/* save query in history */
467
+ /* currently unneeded since we don't use this block if interactive */
468
+ #ifdef NOT_USED
465
469
if (pset .cur_cmd_interactive )
466
470
pg_send_history (history_buf );
471
+ #endif
467
472
468
473
/* execute query unless we're in an inactive \if branch */
469
474
if (conditional_active (cond_stack ))
You can’t perform that action at this time.
0 commit comments