aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/input.c
Commit message (Collapse)AuthorAge
* Update copyrights for 2013Bruce Momjian2013-01-01
| | | | | Fully update git head, and update back branches in ./COPYRIGHT and legal.sgml files.
* Run pgindent on 9.2 source tree in preparation for first 9.3Bruce Momjian2012-06-10
| | | | commit-fest.
* Provide environment overrides for psql file locations.Andrew Dunstan2012-03-03
| | | | | PSQL_HISTORY provides an alternative for the command history file, and PSQLRC provides an alternative location for the .psqlrc file.
* Update copyright notices for year 2012.Bruce Momjian2012-01-01
|
* Remove support for on_exit()Peter Eisentraut2011-12-27
| | | | | | All supported platforms support the C89 standard function atexit() (SunOS 4 probably being the last one not to), and supporting both makes the code clumsy.
* Don't elide blank lines when accumulating psql command history.Robert Haas2011-11-15
| | | | | | | This can change the meaning of queries, if the blank line happens to occur in the middle of a quoted literal, as per complaint from Tomas Vondra. Back-patch to all supported branches.
* Stamp copyrights for year 2011.Bruce Momjian2011-01-01
|
* Remove cvs keywords from all files.Magnus Hagander2010-09-20
|
* pgindent run for 9.0Bruce Momjian2010-02-26
|
* Update copyright for the year 2010.Bruce Momjian2010-01-02
|
* Write psql's ~/.psql_history file using history_truncate_file() andTom Lane2009-09-13
| | | | | | | | | | append_history(), if libreadline is new enough to have those functions (they seem to be present at least since 4.2; but libedit may not have them). This gives significantly saner behavior when two or more sessions overlap in their use of the history file; although having two sessions exit at just the same time is still perilous to your history. The behavior of \s remains unchanged, ie, overwrite whatever was there. Per bug #5052 from Marek Wójtowicz.
* Update copyright for 2009.Bruce Momjian2009-01-01
|
* Adjust the behavior of the PQExpBuffer code to make it have well-definedTom Lane2008-11-26
| | | | | | | | | results (ie, an empty "broken" buffer) if memory overrun occurs anywhere along the way to filling the buffer. The previous coding would just silently discard portions of the intended buffer contents, as exhibited in trouble report from Sam Mason. Also, tweak psql's main loop to correctly detect and report such overruns. There's probably much more that should be done in this line, but this is a start.
* 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.
* Make HISTCONTROL=ignoredups work again (broken by misordering ofTom Lane2006-12-24
| | | | operations during recent code refactoring). Per bug #2840 from Ned Crigler.
* 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 saveHistory work properly on OS X when HISTFILE is set to /dev/null.Tom Lane2006-08-27
| | | | Per discussion with Martin Atukunda.
* Remove 576 references of include files that were not needed.Bruce Momjian2006-07-14
|
* Fix saveHistory() to not emit bogus complaint during psql exit when usingTom Lane2006-06-18
| | | | | Darwin's libedit; per my proposal last August. Also, suppress cast-away- const warnings.
* 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.
* 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
* 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
|
* Place function names in first column for consistency.Bruce Momjian2006-02-13
|
* Fix build failure when not USE_READLINE. Sergey E. KoposovTom Lane2006-02-13
|
* Use 0x01 for newlines in saved history. It was determined to be notBruce Momjian2006-02-12
| | | | | used by multi-byte sequences, but futher invesetigation might prove this to be false.
* 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
* Standard pgindent run for 8.1.Bruce Momjian2005-10-15
|
* Use saveHistory so we get a nice error message on failure.Bruce Momjian2005-06-10
| | | | Andreas Seltenreich
* the following patch makes the filename used to store the readlineBruce Momjian2005-06-10
| | | | | | | | | | | | | | history customizable through a variable named HISTFILE, analogous to psql's already implemented HISTCONTROL and HISTSIZE variables, and bash's HISTFILE-Variable. The motivation was to be able to get psql to maintain separate histories for separate databases. This is now easily achievable through a line like the following in ~/.psqlrc: \set HISTFILE ~/.psql_history-:DBNAME Andreas Seltenreich
* Adjust lookup of client-side profile files (.pgpass and so on) as perTom Lane2005-01-06
| | | | | | discussion on pgsql-hackers-win32 list. Documentation still needs to be tweaked --- I'm not sure how to refer to the APPDATA folder in user documentation.
* Update copyrights that were missed.Bruce Momjian2005-01-01
|
* Message style revisionsPeter Eisentraut2004-10-12
|
* Say "history is not supported" and remove "on this platform" for lack ofBruce Momjian2004-10-06
| | | | readline.
* Suppress psql \s help display for platforms like Win32 that don'tBruce Momjian2004-10-06
| | | | | typically install witn readline, and throw an error if they try to access it.
* Remove inclusion of windows.h now that it is included in c.h, per ideaBruce Momjian2004-09-27
| | | | from Peter.
* Pgindent run for 8.0.Bruce Momjian2004-08-29
|
* Update copyright to 2004.Bruce Momjian2004-08-29
|
* Add get_home_path() to use USERPROFILE on Win32 and HOME on Unix.Bruce Momjian2004-08-18
|
* 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().
* $Header: -> $PostgreSQL Changes ...PostgreSQL Daemon2003-11-29
|
* Remove WIN32_CONSOLE support, at the request of the author.Bruce Momjian2003-09-12
|
* Clean up WIN32_CONSOLE code.Bruce Momjian2003-09-05
|
* psql's HISTSIZE from .psqlrc do not want to be set so I did it for psqlBruce Momjian2003-08-26
| | | | | | that HISTSIZE might take effect from my .psqlrc Andriy Tkachuk
* Fix some copyright notices that weren't updated. Improve copyright toolTom Lane2003-08-04
| | | | so it won't miss 'em again.