summaryrefslogtreecommitdiff
path: root/src/bin/psql/prompt.c
AgeCommit message (Collapse)Author
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
2000-02-07Fixed psql double quoting of SQL idsPeter Eisentraut
Fixed libpq printing functions
2000-01-29A few minor psql enhancementsPeter Eisentraut
Initdb help correction Changed end/abort to commit/rollback and changed related notices Commented out way old printing functions in libpq Fixed a typo in alter table / alter column
2000-01-18another set of cleanupsPeter Eisentraut
2000-01-14Fixed psql variables vs array syntax, as well as minor psql enhancementsPeter Eisentraut
2000-01-12Fixed a few "fixes" and bugs. Adjusted messages and options to GNU suggestions.Peter Eisentraut
1999-11-26* Includes tab completion. It's not magic, but it's very cool. At anyBruce Momjian
rate it's better than what used to be there. * Does proper SQL "host variable" substitution as pointed out by Andreas Zeugwetter (thanks): select * from :foo; Also some changes in how ':' and ';' are treated (escape with \ to send to backend). This does _not_ affect the '::' cast operator, but perhaps others that contain : or ; (but there are none right now). * To show description with a <something> listing, append '?' to command name, e.g., \df?. This seemed to be the convenient and logical solution. Or append a '+' to see more useless information, e.g., \df+. * Fixed fflush()'ing bug pointed out by Jan during the regression test discussion. * Added LastOid variable. This ought to take care of TODO item "Add a function to return the last inserted oid, for use in psql scripts" (under CLIENTS) E.g., insert into foo values(...); insert into bar values(..., :LastOid); \echo $LastOid * \d command shows constraints, rules, and triggers defined on the table (in addition to indices) * Various fixes, optimizations, corrections * Documentation update as well Note: This now requires snprintf(), which, if necessary, is taken from src/backend/port. This is certainly a little weird, but it should suffice until a source tree cleanup is done. Enjoy. -- Peter Eisentraut Sernanders väg 10:115
1999-11-04psql cleanupBruce Momjian
1999-11-04Major psql overhaul by Peter Eisentraut.Bruce Momjian