aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/command.c
Commit message (Collapse)AuthorAge
* 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.
* Prepare code to be built by MSVC:Bruce Momjian2006-06-07
| | | | | | | | | | o remove many WIN32_CLIENT_ONLY defines o add WIN32_ONLY_COMPILER define o add 3rd argument to open() for portability o add include/port/win32_msvc directory for system includes Magnus Hagander
* Fix up hack to suppress escape_string_warning so that it actually worksTom Lane2006-06-01
| | | | | | and there's only one place that's a kluge, ie, appendStringLiteralConn. Note that pg_dump itself doesn't use appendStringLiteralConn, so its behavior is not affected; only the other utility programs care.
* Escape processing patch:Bruce Momjian2006-05-31
| | | | | | | | | | o turns off escape_string_warning in pg_dumpall.c o optionally use E'' for \password (undocumented option?) o honor standard_conforming-strings for \copy (but not support literal E'' strings) o optionally use E'' for \d commands o turn off escape_string_warning for createdb, createuser, droplang
* Rewrite much of psql's \connect code, for the sake of code clarity andNeil Conway2006-04-02
| | | | | | | | | | | | | | | | to fix regressions introduced in the recent patch adding additional \connect options. This is based on work by Volkan YAZICI, although this version of the patch doesn't bear much resemblance to Volkan's version. \connect takes 4 optional arguments: database name, user name, host name, and port number. If any of those parameters are omitted or specified as "-", the value of that parameter from the previous connection is used instead; if there is no previous connection, the libpq default is used. Note that this behavior makes it impossible to reuse the libpq defaults without quitting psql and restarting it; I don't really see the use case for needing to do that.
* 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
* Update copyright for 2006. Update scripts.Bruce Momjian2006-03-05
|
* Use DEVTTY as 'con' on Win32 as a replacement for /dev/tty.Bruce Momjian2006-03-04
|
* Avoid trying to open /dev/tty on Win32. Some Win32 systems haveBruce Momjian2006-03-03
| | | | | | | | | | | /dev/tty, but it isn't a device file and doesn't work as expected. This fixes a known bug where psql does not prompt for a password on some Win32 systems. Backpatch to 8.1.X. Robert Kinberg
* Add psql option:Bruce Momjian2006-02-12
| | | | | | -1 or --single-transaction Simon Riggs
* I've created a new shared catalog table pg_shdescription to storeBruce Momjian2006-02-12
| | | | | | | | | | | | | | | | | | comments on cluster global objects like databases, tablespaces, and roles. It touches a lot of places, but not much in the way of big changes. The only design decision I made was to duplicate the query and manipulation functions rather than to try and have them handle both shared and local comments. I believe this is simpler for the code and not an issue for callers because they know what type of object they are dealing with. This has resulted in a shobj_description function analagous to obj_description and backend functions [Create/Delete]SharedComments mirroring the existing [Create/Delete]Comments functions. pg_shdescription.h goes into src/include/catalog/ Kris Jurka
* Please find enclosed a patch that lets you use \c to connectBruce Momjian2006-02-12
| | | | | | | | | (optionally) to a new host and port without exiting psql. This eliminates, IMHO, a surprise in that you can now connect to PostgreSQL on a differnt machine from the one where you started your session. This should help people who use psql as an administrative tool. David Fetter
* Rename pg_make_encrypted_password to PQencryptPassword.Peter Eisentraut2005-12-26
|
* Add an officially exported libpq function to encrypt passwords, andTom Lane2005-12-23
| | | | | modify the previous \password patch to use it instead of depending on a not-officially-exported function. Per discussion.
* 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.
* Add missing translation markerPeter Eisentraut2005-12-08
|
* Standard pgindent run for 8.1.Bruce Momjian2005-10-15
|
* Return proper value for psql -f filename failure if filename open fails.Bruce Momjian2005-09-20
| | | | Backpatch to 8.0.X.
* Fix up tab completion for ROLEs and add some more completion logic forTom Lane2005-08-14
| | | | | | other stuff; change \du and \dg to be role-aware (Stefan Kaltenbrunner). Also make tab completion fetch the list of GUC variables from pg_settings instead of having a hard-wired copy of the list (Tom Lane).
* Add username for psql password prompt, if the username was specified.Bruce Momjian2005-07-25
| | | | Adrian Maier
* \pset numericsep -> numericlocale.Bruce Momjian2005-07-18
|
* Change numericsep to a boolean, and make it locale-aware.Bruce Momjian2005-07-14
|
* barebones variable name -> tuples_only, for consistency.Bruce Momjian2005-07-14
|
* Add psql \pset numericsep to allow output numbers like 100,000.0 orBruce Momjian2005-07-10
| | | | | | 100.000,0. Eugen Nedelcu
* Per discussion on -hackers, this patch changes psql's "expanded" outputNeil Conway2005-06-13
| | | | | | mode to only affect the presentation of normal query results, not the output of psql slash commands. Documentation updated. I also made some unrelated minor psql cleanup. Per suggestion from Stuart Cooper.
* This patch shows the full path name when doing a \s in psql,Bruce Momjian2005-06-09
| | | | | | if you have previously issued a \cd command. Greg Sabino Mullane
* I've created a patch which adds support for troff "-ms" output toBruce Momjian2005-06-09
| | | | | | | | | | | | | | | | | | | | | | | psql. i.e. "\pset format troff-ms". The patch also corrects some problems with the "latex" format, notably defining an extra column in the output table, and correcting some alignment issues; it also changes the output to match the border setting as documented in the manual page and as shown with the "aligned" format. The troff-ms output is mostly identical to the latex output allowing for the differences between the two typesetters. The output should be saved in a file and piped as follows: cat file | tbl | troff -T ps -ms > file.ps or tbl file | troff -T ps -ms > file.ps Because it contains tabs, you'll need to redirect psql output or use "script", rather than pasting from a terminal window, due to the tabs which can be replaced with spaces. Roger Leigh
* Backpatch BCC compile changes to 8.0.X for psql.Bruce Momjian2005-04-29
|
* Add sprintf support, that were were missing.Bruce Momjian2005-03-16
| | | | Add support for snprintf '+', 'h', and %* length settings.
* Define snprintf() to call pg_snprintf() so our own snprintf-likeBruce Momjian2005-03-11
| | | | | implementation doesn't export out via libpq and get used by a user application.
* 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
|
* Prevent evaluation of backticks while discarding unwanted argumentsTom Lane2004-12-19
| | | | | | | | after an unknown or failed psql backslash command, and also while discarding "extra" arguments of a putatively valid backslash command. In the case of an unknown/failed command, make sure we discard the whole rest of the line, rather than trying to resume at the next backslash. Per discussion with Thomer Gil.
* Add \n to end of output for psql \s with no history file name.Bruce Momjian2004-11-30
| | | | | This prevents the next psql prompt from showing up on the end of the last history line.
* Quote SHELL arguments only on Win32.Bruce Momjian2004-11-30
|
* Don't quote the value of EDITOR on Unix, only on Windows. Per discussion.Tom Lane2004-11-15
|
* Clarify some stringsPeter Eisentraut2004-11-09
|
* Remove directory from cmd.exe default shell.Bruce Momjian2004-11-06
|
* Variable initializer no longer necessary.Bruce Momjian2004-11-06
|
* Tests for COMSPEC in the right place and supply a reasonable shellBruce Momjian2004-11-06
| | | | default on Win32.
* Fix psql \e and \! for Win32.Bruce Momjian2004-11-04
|
* Allow pg_ctl to determine the server is up when getting a request for aBruce Momjian2004-10-16
| | | | | | | | password. Make password error message a #define and use it consistently. Sean Chittenden
* Add 'int' cast for getpid() because some Solaris releases return longBruce Momjian2004-10-14
| | | | for getpid().
* Make getpid() use %d consistently for printing.Bruce Momjian2004-10-09
|
* Adjust comments previously moved to column 1 by pgident.Bruce Momjian2004-10-07
|
* Pgindent run for 8.0.Bruce Momjian2004-08-29
|
* Update copyright to 2004.Bruce Momjian2004-08-29
|
* Fix core dumps, inability to count, etc associated with canonicalize_pathTom Lane2004-08-13
| | | | patches.
* Add permission display to \db+.Bruce Momjian2004-07-15
|
* Have \dn+ show permissions and description for schemas.Bruce Momjian2004-07-13
| | | | Dennis Bjorklund