summaryrefslogtreecommitdiff
path: root/src/bin/psql/psql.c
Commit message (Collapse)AuthorAgeFilesLines
* While I was running some tests in psql, trying to figure out how to changeBruce Momjian1999-07-201-2/+3
| | | | | | | | | | | | | | the query string to handle any length, I discovered that under certain conditions, psql will core dump when handling long strings. Thus, the patch. It was caused by a buffer overrun, probably not noticeable in a lot of cases, but pretty noticeable in mine. Problem was caused by the fact that the length check is only performed after the check for a ; to get the end of the query and execute. Cheers... MikeA
* psql fix.Bruce Momjian1999-07-191-4/+6
|
* Cleanup of patch just applied.Bruce Momjian1999-07-191-8/+4
|
* Set the application name, used for parsing readline's .inputrc -- dzBruce Momjian1999-07-191-1/+8
| | | | Massimo
* Re-add getopt.h check, remove NT-specific tests for it.Bruce Momjian1999-07-191-2/+5
|
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-171-4/+2
|
* Suppress indexes on large objects from psql's \d listing;Tom Lane1999-06-041-11/+24
| | | | | | | | they were confusing because the large object tables themselves are not shown. (Besides, if you've got hundreds or thousands of large objects, you really don't want to see 'em at all.) Also, suppress all indexes from the \z ACL listing, since indexes have no meaningful protection information.
* Clean up uninitialized-variable warning from egcs.Tom Lane1999-05-301-7/+12
| | | | (Curious that gcc doesn't complain about this code...).
* Display numeric precision on \d.Bruce Momjian1999-05-261-1/+5
|
* pgindent run over code.Bruce Momjian1999-05-251-76/+95
|
* Do not refer to stdin in static variable initializer ...Tom Lane1999-05-121-2/+8
| | | | apparently some systems choke on that :-(.
* here are some patches for 6.5.0 which I already submitted but have neverBruce Momjian1999-05-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | been applied. The patches are in the .tar.gz attachment at the end: varchar-array.patch this patch adds support for arrays of bpchar() and varchar(), which where always missing from postgres. These datatypes can be used to replace the _char4, _char8, etc., which were dropped some time ago. block-size.patch this patch fixes many errors in the parser and other program which happen with very large query statements (> 8K) when using a page size larger than 8192. This patch is needed if you want to submit queries larger than 8K. Postgres supports tuples up to 32K but you can't insert them because you can't submit queries larger than 8K. My patch fixes this problem. The patch also replaces all the occurrences of `8192' and `1<<13' in the sources with the proper constants defined in include files. You should now never find 8192 hardwired in C code, just to make code clearer. -- Massimo Dal Zotto
* psql's recognition of comments didn't work right in MULTIBYTETom Lane1999-04-251-58/+32
| | | | environments; it was being careless about character lengths.
* psql did the wrong thing with COPY FROM STDIN inside a fileTom Lane1999-04-151-65/+73
| | | | | | | sourced with \i (tried to read data from the terminal, rather than from the source file; this breaks pg_dump scripts read with \i). Also, \o file followed by COPY TO STDOUT wrote to terminal not designated file. All better now.
* Bug fixes and enhances to psql submitted by Masaaki SakaidaTatsuo Ishii1999-03-301-10/+58
| | | | | | 1. Fix problems of PAGER and \? command 2. Add -E option that shows actual queries sent by \dt and friends 3. Add version number in startup banners for psql
* Fix typo. #ifdef MUTIBYTE --> #ifdef MULTIBYTETatsuo Ishii1999-03-241-2/+2
|
* > > > This patches src/bin/psql/psql.c.Bruce Momjian1999-03-151-2/+26
| | | | | | | > > > > > > This patch is in responce to the following TODO list item: > > > * have psql \d on a view show the query > > > -Ryan
* From: Tatsuo Ishii <t-ishii@sra.co.jp>Marc G. Fournier1999-02-211-2/+2
| | | | | | Ok. I made patches replacing all of "#if FALSE" or "#if 0" to "#ifdef NOT_USED" for current. I have tested these patches in that the postgres binaries are identical.
* Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian1999-02-131-2/+2
|
* Allow psql to do \p\g. Ingres does it, why not us?Bruce Momjian1999-02-071-17/+40
|
* Cleanup of source files where 'return' or 'var =' is alone on a line.Bruce Momjian1999-02-031-3/+2
|
* From: Tatsuo Ishii <t-ishii@sra.co.jp>Marc G. Fournier1999-01-271-2/+3
| | | | | | Included patches fix a portability problem of unsetenv() used in 6.4.2 multi-byte support. unsetenv() is only avaliable on FreeBSD and Linux so I decided to replace with putenv().
* Apply Win32 patch from Horak Daniel.Bruce Momjian1999-01-171-1/+28
|
* Current multi-byte related codes have a bug with SQL_ASCIIBruce Momjian1998-12-141-1/+22
| | | | | | | | | | | support. Included patches will solve it and should be applied to both trees. Also, it fix the problem with \c command of psql when switching different encoding databases. Regression tests passed. -- Tatsuo Ishii t-ishii@sra.co.jp
* Additional fixes for mixed-case table names from Billy Allie.Thomas G. Lockhart1998-11-171-3/+8
|
* Get rid of some minor compiler warnings.Tom Lane1998-10-261-5/+5
|
* Hello!Bruce Momjian1998-10-081-13/+1
| | | | | | | | | | | | | | | | | | | Here are two new patches for the Win32 support. 1) The patch based on the one from Hiroshi Inoue [Inoue@tpf.co.jp], to load Winsock.dll from libpq.dll. 2) A patch for psql.c to remove the call to WSAStartup(), since it is not required when it's done in libpq.dll. I'm still looking for the possibility of having a crypt() function in libpq.dll too, the same way getopt was included. Any chance of getting this before 6.4, or should we wait for the next one? //Magnus
* Fix for \z formatting from Tom Lane.Bruce Momjian1998-09-211-9/+49
|
* patch cleanups.Bruce Momjian1998-09-031-2/+2
|
* Attached is a patch to remove the definitions of libpq's internalBruce Momjian1998-09-031-19/+16
| | | | | | | | | | | | | | | | | structs from libpq-fe.h, as we previously discussed. There turned out to be sloppy coding practices in more places than I had realized :-(, but all in all I think it was a well-worth-while exercise. I ended up adding several routines to libpq's API in order to respond to application requirements that were exposed by this work. I owe the docs crew updates for libpq.sgml to describe these changes. I'm way too tired to work on the docs tonight, however. This is the last major change I intend to submit for 6.4. I do want to see if I can make libpgtcl work with Tcl 8.0 before we go final, but hopefully that will be a minor bug fix.
* OK, folks, here is the pgindent output.Bruce Momjian1998-09-011-104/+113
|
* Hello!Bruce Momjian1998-08-291-8/+13
| | | | | | | | | | | | | | | | | | Here is a new patch for libpq, to make it work on Win32 again (since the latest modifications broke it a little). Please also add the file "libpq.rc" to the interfaces/libpq directory. This will allow version-stamping of the generated DLL file, so that automatic install programs (and interested users) can determine the version of the file. The file is currently set as "prerelease". Before the release, somebody should change the line "FILEFLAGS VS_FF_PRERELEASE" to "FILEFLAGS 0". That information should probably go into toos\RELEASE_CHANGES. The patch is against the cvs as of ~ 1998-08-26 14:30 CEST. //Magnus
* From: Magnus Hagander <mha@edu.sollentuna.se>Marc G. Fournier1998-08-271-3/+40
| | | | | | | | | Ok. Here is a patch to make psql work on Win32 (as a console mode application, of course). It requires getopt.c to be in src/utils - works fine with the FreeBSD version of it. Also, the file win32.mak should go into src/bin/psql.
* With the attached patch, I have verified that long (> 8char anyway)Bruce Momjian1998-08-221-99/+24
| | | | | | | | | | | | | | | | | | | | | usernames and passwords work correctly in both "password" and "crypt" authorization mode. NOTE: at least on my machine, it seems that the crypt() routines ignore the part of the password beyond 8 characters, so there's no security gain from longer passwords in crypt auth mode. But they don't fail. The login-related part of psql has apparently not been touched since roughly the fall of Rome ;-). It was going through huge pushups to get around the lack of username/login parameters to PQsetdb. I don't know when PQsetdbLogin was added to libpq, but it's there now ... so I was able to rip out quite a lot of crufty code while I was at it. It's possible that there are still bogus length limits on username or password in some of the other PostgreSQL user interfaces besides psql/libpq. I will leave it to other folks to check that code. regards, tom lane
* Date: Sun, 16 Aug 1998 14:56:48 -0400Marc G. Fournier1998-08-171-14/+15
| | | | | | | | From: Tom Lane <tgl@sss.pgh.pa.us> Attached is a patch for this weekend's work on libpq. I've dealt with several issues: <for details: see message, in pgsql-patches archive for above data>
* Add new \w write command to psql.Bruce Momjian1998-08-101-37/+61
|
* Make large objects their own relkind type. Fix dups in pg_class_mbBruce Momjian1998-08-061-3/+1
| | | | files. Fix sequence creation hack for relkind type.
* Fix for \d index display.Bruce Momjian1998-08-051-3/+3
|
* Add Indices display to \d command.Bruce Momjian1998-08-041-8/+39
|
* Fix compile error. Make transaction/work optional on all transactionBruce Momjian1998-07-261-2/+2
| | | | | statements. More cleanups of psql help. Fix for shift/reduce on UNION in subselect.
* Add auto-size to screen to \d? commands. Use UNION to show allBruce Momjian1998-07-181-175/+235
| | | | | \d? results in one query. Add \d? field search feature. Rename MB to MULTIBYTE.
* From: Tom Lane <tgl@sss.pgh.pa.us>Marc G. Fournier1998-07-091-9/+23
| | | | | | | | | | | | | | | | | | Making PQrequestCancel safe to call in a signal handler turned out to be much easier than I feared. So here are the diffs. Some notes: * I modified the postmaster's packet "iodone" callback interface to allow the callback routine to return a continue-or-drop-connection return code; this was necessary to allow the connection to be closed after receiving a Cancel, rather than proceeding to launch a new backend... Being a neatnik, I also made the iodone proc have a typechecked parameter list. * I deleted all code I could find that had to do with OOB. * I made some edits to ensure that all signals mentioned in the code are referred to symbolically not by numbers ("SIGUSR2" not "2"). I think Bruce may have already done at least some of the same edits; I hope that merging these patches is not too painful.
* Hi, here are the patches to enhance existing MB handling. This timeBruce Momjian1998-06-161-5/+47
| | | | | | | | | | | | | | | | I have implemented a framework of encoding translation between the backend and the frontend. Also I have added a new variable setting command: SET CLIENT_ENCODING TO 'encoding'; Other features include: Latin1 support more 8 bit cleaness See doc/README.mb for more details. Note that the pacthes are against May 30 snapshot. Tatsuo Ishii
* Remove un-needed braces around single statements.Bruce Momjian1998-06-151-29/+1
|
* Another \f\ fix for psql.Bruce Momjian1998-05-151-3/+11
|
* Fix to allow \f \ to make spaces as delimiter.Bruce Momjian1998-05-131-1/+3
|
* The attached patch corrects two problems with autoconfiguration ofBruce Momjian1998-05-121-2/+5
| | | | | | | | | | | | | | | | psql in Postgres 6.3.2. Both of these problems were complained of recently in pgsql-questions: 1. In the right circumstances, psql.c will fail to compile due to trying to include a nonexistent <history.h>. (Thread "Compile-time error" around 17 Apr 98.) 2. In other circumstances, psql will compile but does not provide command history capability, even though the underlying readline library supports it. (Various threads, most recently "query repetition in psql" around 29 Apr.) Tom Lane
* Give proper error on psql \copy use.Bruce Momjian1998-05-121-2/+8
|
* What I've done:Bruce Momjian1998-05-061-4/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Rewritten libpq to allow asynchronous clients. 2. Implemented client side of cancel protocol in library, and patched psql.c to send a cancel request upon SIGINT. The backend doesn't notice it yet :-( 3. Implemented 'Z' protocol message addition and renaming of copy in/out start messages. These are implemented conditionally, ie, the client protocol version is checked; so the code should still work with 1.0 clients. 4. Revised protocol and libpq sgml documents (don't have an SGML compiler, though, so there may be some markup glitches here). What remains to be done: 1. Implement addition of atttypmod field to RowDescriptor messages. The client-side code is there but ifdef'd out. I have no idea what to change on the backend side. The field should be sent only if protocol >= 2.0, of course. 2. Implement backend response to cancel requests received as OOB messages. (This prolly need not be conditional on protocol version; just do it if you get SIGURG.) 3. Update libpq.3. (I'm hoping this can be generated mechanically from libpq.sgml... if not, will do it by hand.) Is there any other doco to fix? 4. Update non-libpq interfaces as necessary. I patched libpgtcl so that it would compile, but haven't tested it. Dunno what needs to be done with the other interfaces. Have at it! Tom Lane
* Fix for missing parens with \g causing psql to get completelyBruce Momjian1998-05-041-1/+4
| | | | confused.