aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/mainloop.c
Commit message (Collapse)AuthorAge
...
* Editorialization for the text emitted by the "help" psql command.Neil Conway2008-06-10
| | | | | | Basically just reuse the same text that psql emitted as part of its startup banner in prior versions, and make some whitespace more consistent with the conventions in other psql command output.
* Update psql startup banner to be shorter, suggest "help" for help.Bruce Momjian2008-05-16
| | | | | | | | | | Add a few "help" entries. Move \g help entry into "General". Update psql version mismatch warning text. Joshua D. Drake
* A small visit from the portability and localization police.Tom Lane2008-04-05
|
* Have psql command 'help' suggest the use of \?, updated version.Bruce Momjian2008-04-04
| | | | Greg Sabino Mullane
* Allow 'help' in psql to show \? help, for novice assistance.Bruce Momjian2008-04-04
| | | | Greg Sabino Mullane
* Update copyrights in source tree to 2008.Bruce Momjian2008-01-01
|
* Properly recognize and announce input errors.Peter Eisentraut2007-11-28
|
* Update CVS HEAD for 2007 copyright. Back branches are typically notBruce Momjian2007-01-05
| | | | back-stamped for this.
* pgindent run for 8.2.Bruce Momjian2006-10-04
|
* Invent an assign-hook mechanism for psql variables similar to the oneTom Lane2006-08-29
| | | | | | | | | existing for backend GUC variables, and use this to eliminate repeated fetching/parsing of psql variables in psql's inner loops. In a trivial test with lots of 'select 1;' commands, psql's CPU time went down almost 10%, although of course the effect on total elapsed time was much less. Per discussion about how to ensure the upcoming FETCH_COUNT patch doesn't cost any performance when not being used.
* Make the psql line counter 64-bit so it can handle files > 4gig lines.Bruce Momjian2006-08-11
| | | | David Fetter
* Remove 576 references of include files that were not needed.Bruce Momjian2006-07-14
|
* Clean up psql's control-C handling to avoid longjmp'ing out of randomTom Lane2006-06-14
| | | | | | | | | places --- that risks corrupting data structures, losing sync with the backend, etc. We now longjmp only from calls to readline, fgets, and fread, which we assume are coded to protect themselves against interrupts at undesirable times. This requires adding explicit tests for cancel_pressed in long-running loops, but on the whole it's far cleaner. Martijn van Oosterhout and Tom Lane.
* Code review for psql multiline history patch(es). Fix memory leak,Tom Lane2006-06-11
| | | | | failure to enter commands in history if canceled by control-C, other infelicities.
* For psql multi-line history, save backslash commands right away, ratherBruce Momjian2006-06-07
| | | | than only if there is already history.
* Avoid longjump/vfork warning about line_saved_in_history variable byBruce Momjian2006-06-05
| | | | making it volatile.
* Have psql history save \e editor contents to history before query isBruce Momjian2006-06-05
| | | | executed, like it did for 8.1.X.
* Fix psql so \r is separate in the history, rather than at the end ofBruce Momjian2006-06-04
| | | | the query.
* Fix psql history handling:Bruce Momjian2006-03-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | > 1) Fix the problems with the \s command. > When the saveHistory is executed by the \s command we must not do the > conversion \n -> \x01 (per > http://archives.postgresql.org/pgsql-hackers/2006-03/msg00317.php ) > > 2) Fix the handling of Ctrl+C > > Now when you do > wsdb=# select 'your long query here ' > wsdb-# > and press afterwards the CtrlC the line "select 'your long query here '" > will be in the history > > (partly per > http://archives.postgresql.org/pgsql-hackers/2006-03/msg00297.php ) > > 3) Fix the handling of commands with not closed brackets, quotes, double > quotes. (now those commands are not splitted in parts...) > > 4) Fix the behaviour when SINGLELINE mode is used. (before it was almost > broken ;( Sergey E. Koposov
* Fix psql history handling so 'execute' backslash commands (\g)Bruce Momjian2006-03-06
| | | | remain as part of the multi-line query.
* In psql, save history of backslash commands used in multi-lineBruce Momjian2006-03-06
| | | | | statements before the multi-line statement, rather than inside the multi-line statement.
* Update copyright for 2006. Update scripts.Bruce Momjian2006-03-05
|
* o Improve psql's handling of multi-line statementsBruce Momjian2006-02-11
| | | | | | | | Currently, while \e saves a single statement as one entry, interactive statements are saved one line at a time. Ideally all statements would be saved like \e does. Sergey E. Koposov
* Add new psql command \password for changing role password with client-sidePeter Eisentraut2005-12-18
| | | | password encryption. Also alter createuser command to the same effect.
* Standard pgindent run for 8.1.Bruce Momjian2005-10-15
|
* Use _() macro consistently rather than gettext(). Add translationBruce Momjian2005-02-22
| | | | macros around strings that were missing them.
* Update copyrights that were missed.Bruce Momjian2005-01-01
|
* Invent a new, more thread-safe version of PQrequestCancel, called PQcancel.Tom Lane2004-10-30
| | | | | | Use this new function in psql. Implement query cancellation in psql for Windows. Code by Magnus Hagander, documentation and minor editorialization by Tom Lane.
* Pgindent run for 8.0.Bruce Momjian2004-08-29
|
* Update copyright to 2004.Bruce Momjian2004-08-29
|
* Re-implement psql's input scanning to use a flex-generated lexer, as perTom Lane2004-02-19
| | | | | | | | | recent discussion. The lexer is used for both SQL command text and backslash commands. The purpose of this change is to make it easier to track the behavior of the backend's SQL lexer --- essentially identical flex rules are now used by psql. Also, this cleans up a lot of very squirrelly code in mainloop.c and command.c. The flex code is somewhat bulkier than the removed code, but should be lots easier to maintain.
* More fallout from the recent psql patch: rename xmalloc and friends toNeil Conway2004-01-25
| | | | pg_malloc, to avoid linker failures on same platforms.
* This patch makes some of the memory manipulation performed by psql aNeil Conway2004-01-24
| | | | | | | little more sane. Some parts of the code was using a static function xmalloc() that did safe memory allocation (where "safe" means "bail out on OOM"), but most of it was just invoking calloc() or malloc() directly. Now almost everything invokes xmalloc() or xcalloc().
* Ensure fflush(stdout) happens in all cases, per gripe from Jon Sablatnig.Tom Lane2004-01-21
|
* $Header: -> $PostgreSQL Changes ...PostgreSQL Daemon2003-11-29
|
* Fix some copyright notices that weren't updated. Improve copyright toolTom Lane2003-08-04
| | | | so it won't miss 'em again.
* pgindent run.Bruce Momjian2003-08-04
|
* Improve psql comment coding.Bruce Momjian2003-03-21
|
* Fix multiline C comments in psql.Bruce Momjian2003-03-20
|
* I'm continuing to work on cleaning up code in psql. As things appearBruce Momjian2003-03-20
| | | | | | | | | | | | | | | | | | | | now, my changes seem to work. Some possible minor bugs got squished on the way but I can't be sure without more feedback from people who really put the code to the test. The new patch mostly simplifies variable handling and reduces code duplication. Changes in the command parser eliminate some redundant variables (boolean state + depth counter), replaces some "else if" constructs with switches, and so on. It is meant to be applied together with my previous patch, although I hope they don't conflict; I went back to the CVS version for this one. One more thing I thought should perhaps be changed: an IGNOREEOF value of n will ignore only n-1 EOFs. I didn't want to touch this for fear of breaking existing applications, but it does seem a tad illogical. Jeroen T. Vermeulen
* Here's some changes I made last night to psql's common.c (as found inBruce Momjian2003-03-20
| | | | | | | | | 7.3.2). It removes some code duplication and #ifdeffing, and some unstructured ugliness such as tacky breaks and an unneeded continue. Breaks up a large function into smaller functions and reduces required nesting levels, and kills a variable or two. Jeroen T. Vermeulen
* psql thought that backslash is an escape character inside double quotes.Tom Lane2002-10-12
| | | | It isn't.
* pgindent run.Bruce Momjian2002-09-04
|
* Fix some more boundary-case errors in psql variable substitution:Tom Lane2002-07-03
| | | | | | wasn't really right for case where :var is at the end of the line, was definitely not right if var expanded to empty in that case, and failed to recalculate thislen before jumping back to rescan.
* Noted with versions 7.0.3, 7.1.3, and 7.2.1:Bruce Momjian2002-06-15
| | | | | | | | | The psql interpreter becomes unstable if variable substitutions are used. The debugger GDB was unable to help however mpatrol reports that the sprintf at mainloop.c:389 is steping one byte farther than the allocation. William K. Volkman
* Reset parenthesis level counter upon \r.Peter Eisentraut2002-03-27
|
* Add code to preserve paren level display after \g, as submitted months ago.Bruce Momjian2002-02-18
|
* Oops, back out paren fix. That is for 7.3.Bruce Momjian2001-12-28
|
* Add mention of Christof Petig for ecpg items.Bruce Momjian2001-12-28
|
* New pgindent run with fixes suggested by Tom. Patch manually reviewed,Bruce Momjian2001-11-05
| | | | initdb/regression tests pass.