summaryrefslogtreecommitdiff
path: root/src/bin/psql/prompt.c
AgeCommit message (Collapse)Author
2013-01-01Update copyrights for 2013Bruce Momjian
Fully update git head, and update back branches in ./COPYRIGHT and legal.sgml files.
2012-01-01Update copyright notices for year 2012.Bruce Momjian
2011-01-01Stamp copyrights for year 2011.Bruce Momjian
2010-09-20Remove cvs keywords from all files.Magnus Hagander
2010-04-30Fix a couple of places where the result of fgets() wasn't checked.Tom Lane
This is mostly to suppress compiler warnings, although in principle the cases could result in undesirable behavior. Martin Pitt
2010-01-02Update copyright for the year 2010.Bruce Momjian
2009-01-01Update copyright for 2009.Bruce Momjian
2008-01-01Update copyrights in source tree to 2008.Bruce Momjian
2007-02-08Normalize fgets() calls to use sizeof() for calculating the buffer sizePeter Eisentraut
where possible, and fix some sites that apparently thought that fgets() will overwrite the buffer by one byte. Also add some strlcpy() to eliminate some weird memory handling.
2007-01-05Update CVS HEAD for 2007 copyright. Back branches are typically notBruce Momjian
back-stamped for this.
2006-08-29Invent an assign-hook mechanism for psql variables similar to the oneTom Lane
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.
2006-07-15Fix some missing inclusions identified with new pgcheckdefines tool.Tom Lane
2006-07-14Remove 576 references of include files that were not needed.Bruce Momjian
2006-06-11Code review for psql multiline history patch(es). Fix memory leak,Tom Lane
failure to enter commands in history if canceled by control-C, other infelicities.
2006-04-19Fix a couple of rather-pointless-but-easily-fixed Coverity warnings.Tom Lane
Per Martijn van Oosterhout.
2006-03-05Update copyright for 2006. Update scripts.Bruce Momjian
2006-02-11o Improve psql's handling of multi-line statementsBruce Momjian
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
2006-01-03Fix incorrect treatment of RL_PROMPT_START_IGNORE/RL_PROMPT_END_IGNORE,Tom Lane
per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343616 via Martin Pitt.
2005-10-15Standard pgindent run for 8.1.Bruce Momjian
2005-05-30Support only octal for psql PROMPT values, rather than the confusingBruce Momjian
hex/decimal/octal. Documentation already updated. BACKWARD COMPATIBLE CHANGE
2005-01-01Update copyrights that were missed.Bruce Momjian
2004-08-29Pgindent run for 8.0.Bruce Momjian
2004-08-29Update copyright to 2004.Bruce Momjian
2004-02-24Implement dollar-quoting in the backend lexer and psql. DocumentationTom Lane
is still lacking, as is support in plpgsql and other places, but this is the basic feature. Patch by Andrew Dunstan, some tweaking by Tom Lane. Also, enable %option nodefault in these two lexers, and patch some gaps revealed thereby.
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-20This is a patch to support readline prompts which contain non-printingTom Lane
characters, as for fancy colorized prompts. This was nearly a direct lift from bash-2.05b's lib/readline/display.c, per guidance from Chet Ramey. Reece Hart
2003-11-29$Header: -> $PostgreSQL Changes ...PostgreSQL Daemon
2003-10-04Change transaction status indicator in prompt from %T to %x.Peter Eisentraut
2003-09-03Pass session_authorization to the client and make psql update its promptPeter Eisentraut
accordingly.
2003-08-04Fix some copyright notices that weren't updated. Improve copyright toolTom Lane
so it won't miss 'em again.
2003-08-04pgindent run.Bruce Momjian
2003-06-28Update psql for some features of new FE/BE protocol. There is aTom Lane
client-side AUTOCOMMIT mode now: '\set AUTOCOMMIT off' supports SQL-spec commit behavior. Get rid of LO_TRANSACTION hack --- the LO operations just work now, using libpq's ability to track the transaction status. Add a VERBOSE variable to control verboseness of error message display, and add a %T prompt-string code to show current transaction-block status. Superuser state display in the prompt string correctly follows SET SESSION AUTHORIZATION commands. Control-C works to get out of COPY IN state.
2003-04-04Add Win32 path handling for / vs. \ and drive letters.Bruce Momjian
2003-03-20Remove compile warning.Bruce Momjian
2003-03-20I'm continuing to work on cleaning up code in psql. As things appearBruce Momjian
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
2001-10-25pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian
tests pass.
2001-08-24Reverse sense of comparison in psql socket test, per Tom Lane.Bruce Momjian
2001-08-24There are two problems when compiling libpq.dll and psql.exeBruce Momjian
on Windows. I'm not sure it is the best way to fix them (see patch below.) Mikhail Terekhov with mods by Tom Lane
2001-05-06Make prompt customization work with changeable Unix socket location.Peter Eisentraut
2001-03-22pgindent run. Make it all clean.Bruce Momjian
2001-02-10Restructure the key include files per recent pghackers discussion: thereTom Lane
are now separate files "postgres.h" and "postgres_fe.h", which are meant to be the primary include files for backend .c files and frontend .c files respectively. By default, only include files meant for frontend use are installed into the installation include directory. There is a new make target 'make install-all-headers' that adds the whole content of the src/include tree to the installed fileset, for use by people who want to develop server-side code without keeping the complete source tree on hand. Cleaned up a whole lot of crufty and inconsistent header inclusions.
2000-11-27Pay attention to failure returns from fgets() in all cases.Tom Lane
Avoid infinite loop prompting for password at stdin EOF.
2000-11-13Remove -k unix socketpath option from client side, allow hostname withBruce Momjian
leading slash to behave as a unix socket path.
2000-11-13UUNET is looking into offering PostgreSQL as a part of a managed webBruce Momjian
hosting product, on both shared and dedicated machines. We currently offer Oracle and MySQL, and it would be a nice middle-ground. However, as shipped, PostgreSQL lacks the following features we need that MySQL has: 1. The ability to listen only on a particular IP address. Each hosting customer has their own IP address, on which all of their servers (http, ftp, real media, etc.) run. 2. The ability to place the Unix-domain socket in a mode 700 directory. This allows us to automatically create an empty database, with an empty DBA password, for new or upgrading customers without having to interactively set a DBA password and communicate it to (or from) the customer. This in turn cuts down our install and upgrade times. 3. The ability to connect to the Unix-domain socket from within a change-rooted environment. We run CGI programs chrooted to the user's home directory, which is another reason why we need to be able to specify where the Unix-domain socket is, instead of /tmp. 4. The ability to, if run as root, open a pid file in /var/run as root, and then setuid to the desired user. (mysqld -u can almost do this; I had to patch it, too). The patch below fixes problem 1-3. I plan to address #4, also, but haven't done so yet. These diffs are big enough that they should give the PG development team something to think about in the meantime :-) Also, I'm about to leave for 2 weeks' vacation, so I thought I'd get out what I have, which works (for the problems it tackles), now. With these changes, we can set up and run PostgreSQL with scripts the same way we can with apache or proftpd or mysql. In summary, this patch makes the following enhancements: 1. Adds an environment variable PGUNIXSOCKET, analogous to MYSQL_UNIX_PORT, and command line options -k --unix-socket to the relevant programs. 2. Adds a -h option to postmaster to set the hostname or IP address to listen on instead of the default INADDR_ANY. 3. Extends some library interfaces to support the above. 4. Fixes a few memory leaks in PQconnectdb(). The default behavior is unchanged from stock 7.0.2; if you don't use any of these new features, they don't change the operation. David J. MacKenzie
2000-08-20Introduce HAVE_UNIX_SOCKETS symbol to replace repeatedly listing all thePeter Eisentraut
unsupported platforms.
2000-04-12Ye-old pgindent run. Same 4-space tabs.Bruce Momjian
2000-03-11Karel Zakr's revised patch to fix psql prompt for local host connections.Peter Eisentraut
2000-03-08 Hi Peter,Bruce Momjian
I try change prompt in the psql, but it is set '.' (as '%m') for non-TCP/IP connection. This small patch try use uname() information for non-TCP/IP instead '.'. Karel
2000-02-16Clean up include files use in psql.Bruce Momjian