summaryrefslogtreecommitdiff
path: root/src/bin/psql/command.c
AgeCommit message (Collapse)Author
2005-12-26Rename pg_make_encrypted_password to PQencryptPassword.Peter Eisentraut
2005-12-23Add an officially exported libpq function to encrypt passwords, andTom Lane
modify the previous \password patch to use it instead of depending on a not-officially-exported function. Per discussion.
2005-12-18Add new psql command \password for changing role password with client-sidePeter Eisentraut
password encryption. Also alter createuser command to the same effect.
2005-12-08Add missing translation markerPeter Eisentraut
2005-10-15Standard pgindent run for 8.1.Bruce Momjian
2005-09-20Return proper value for psql -f filename failure if filename open fails.Bruce Momjian
Backpatch to 8.0.X.
2005-08-14Fix up tab completion for ROLEs and add some more completion logic forTom Lane
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).
2005-07-25Add username for psql password prompt, if the username was specified.Bruce Momjian
Adrian Maier
2005-07-18\pset numericsep -> numericlocale.Bruce Momjian
2005-07-14Change numericsep to a boolean, and make it locale-aware.Bruce Momjian
2005-07-14barebones variable name -> tuples_only, for consistency.Bruce Momjian
2005-07-10Add psql \pset numericsep to allow output numbers like 100,000.0 orBruce Momjian
100.000,0. Eugen Nedelcu
2005-06-13Per discussion on -hackers, this patch changes psql's "expanded" outputNeil Conway
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.
2005-06-09This patch shows the full path name when doing a \s in psql,Bruce Momjian
if you have previously issued a \cd command. Greg Sabino Mullane
2005-06-09I've created a patch which adds support for troff "-ms" output toBruce Momjian
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
2005-04-29Backpatch BCC compile changes to 8.0.X for psql.Bruce Momjian
2005-03-16Add sprintf support, that were were missing.Bruce Momjian
Add support for snprintf '+', 'h', and %* length settings.
2005-03-11Define snprintf() to call pg_snprintf() so our own snprintf-likeBruce Momjian
implementation doesn't export out via libpq and get used by a user application.
2005-02-22Use _() macro consistently rather than gettext(). Add translationBruce Momjian
macros around strings that were missing them.
2005-01-01Update copyrights that were missed.Bruce Momjian
2004-12-19Prevent evaluation of backticks while discarding unwanted argumentsTom Lane
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.
2004-11-30Add \n to end of output for psql \s with no history file name.Bruce Momjian
This prevents the next psql prompt from showing up on the end of the last history line.
2004-11-30Quote SHELL arguments only on Win32.Bruce Momjian
2004-11-15Don't quote the value of EDITOR on Unix, only on Windows. Per discussion.Tom Lane
2004-11-09Clarify some stringsPeter Eisentraut
2004-11-06Remove directory from cmd.exe default shell.Bruce Momjian
2004-11-06Variable initializer no longer necessary.Bruce Momjian
2004-11-06Tests for COMSPEC in the right place and supply a reasonable shellBruce Momjian
default on Win32.
2004-11-04Fix psql \e and \! for Win32.Bruce Momjian
2004-10-16Allow pg_ctl to determine the server is up when getting a request for aBruce Momjian
password. Make password error message a #define and use it consistently. Sean Chittenden
2004-10-14Add 'int' cast for getpid() because some Solaris releases return longBruce Momjian
for getpid().
2004-10-09Make getpid() use %d consistently for printing.Bruce Momjian
2004-10-07Adjust comments previously moved to column 1 by pgident.Bruce Momjian
2004-08-29Pgindent run for 8.0.Bruce Momjian
2004-08-29Update copyright to 2004.Bruce Momjian
2004-08-13Fix core dumps, inability to count, etc associated with canonicalize_pathTom Lane
patches.
2004-07-15Add permission display to \db+.Bruce Momjian
2004-07-13Have \dn+ show permissions and description for schemas.Bruce Momjian
Dennis Bjorklund
2004-07-11Use canonicalize_path for -D, GUC paths, and paths coming in fromBruce Momjian
environment variables.
2004-07-11Use standard macro for psql binary file open. Add comment explainingBruce Momjian
control-z requirement.
2004-07-11Open files in binary mode on Win32 so control-z isn't seen as EOF.Bruce Momjian
2004-06-18Tablespaces. Alternate database locations are dead, long live tablespaces.Tom Lane
There are various things left to do: contrib dbsize and oid2name modules need work, and so does the documentation. Also someone should think about COMMENT ON TABLESPACE and maybe RENAME TABLESPACE. Also initlocation is dead, it just doesn't know it yet. Gavin Sherry and Tom Lane.
2004-05-07Solve the 'Turkish problem' with undesirable locale behavior for caseTom Lane
conversion of basic ASCII letters. Remove all uses of strcasecmp and strncasecmp in favor of new functions pg_strcasecmp and pg_strncasecmp; remove most but not all direct uses of toupper and tolower in favor of pg_toupper and pg_tolower. These functions use the same notions of case folding already developed for identifier case conversion. I left the straight locale-based folding in place for situations where we are just manipulating user data and not trying to match it to built-in strings --- for example, the SQL upper() function is still locale dependent. Perhaps this will prove not to be what's wanted, but at the moment we can initdb and pass regression tests in Turkish locale.
2004-03-27Add comment about psql \s (history display):Bruce Momjian
/* This scrolls off the screen when using /dev/tty */
2004-03-21Revise syntax-error reporting behavior to give pleasant results forTom Lane
errors in internally-generated queries, such as those submitted by plpgsql functions. Per recent discussions with Fabien Coelho.
2004-02-19Re-implement psql's input scanning to use a flex-generated lexer, as perTom Lane
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.
2004-01-26Ensure that close() and fclose() are checked for errors, at least inTom Lane
cases involving writes. Per recent discussion about the possibility of close-time failures on some filesystems. There is a TODO item for this, too.
2004-01-25More fallout from the recent psql patch: rename xmalloc and friends toNeil Conway
pg_malloc, to avoid linker failures on same platforms.
2004-01-24This patch makes some of the memory manipulation performed by psql aNeil Conway
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().
2004-01-09Allow psql to handle tilde user expansion for file names.Bruce Momjian
Zach Irmen