aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/print.c
Commit message (Collapse)AuthorAge
* Update copyrights that were missed.Bruce Momjian2005-01-01
|
* Get rid of perror(), substitute some better phrased error messages.Peter Eisentraut2004-11-09
| | | | malloc() doesn't set errno, so most uses were buggy anyway.
* Add new macro as shorthand for MS VC and Borland C++:Bruce Momjian2004-09-27
| | | | | | + #if defined(_MSC_VER) || defined(__BORLANDC__) + #define WIN32_CLIENT_ONLY + #endif
* Pgindent run for 8.0.Bruce Momjian2004-08-29
|
* Update copyright to 2004.Bruce Momjian2004-08-29
|
* I have noticed that the latex format in psql has some bugs:Bruce Momjian2004-08-06
| | | | | | | | | | | | | | | | | | | o "_" is not escaped, and causes TeX to abort, thinking it's a subscript outside of maths mode. Most of my table and field names use underscores, so this is a really nasty one. o The column count is calculated using the contents of opt_align. But opt_align has one extra element, and so it's always one too many. I changed it to count the column headings, like all the other output formats. There may be a bug in computing opt_align that this patch does not address, but I'm not yet familiar enough with the psql source to fix this as well. o The line drawing rules for each border setting (0-3) and expanded mode didn't always match the documented behaviour and what other formats (e.g. aligned) did. I made it as conformant as possible, and also tidied the alignment of the first line of the footer, which was incorrectly indented. Roger Leigh
* A few cosmetic fixes and code cleanup.Neil Conway2004-05-23
|
* Move find_my_exec() way up into main.c so it is available to theBruce Momjian2004-05-18
| | | | | | | | timezone code and other places. Remove elog() calls from find_my_exec; do fprintf(stderr) instead. We can then remove the exec.c handling in the makefile because it doesn't have to be built to suppress elog calls.
* Revert the change to print.c, as this breaks src/bin/scripts. The properNeil Conway2004-01-24
| | | | | | way to fix this is probably implementing safe memory handling functions once in a static lib and then using that in the various client apps, but for the moment I've just reverted the change to un-break the tree.
* This patch makes some of the memory manipulation performed by psql aNeil Conway2004-01-24
| | | | | | | 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().
* $Header: -> $PostgreSQL Changes ...PostgreSQL Daemon2003-11-29
|
* Someone moved PageOutput here from common.c, but forgot to move allTom Lane2003-08-14
| | | | the #includes it depends on.
* Fix some copyright notices that weren't updated. Improve copyright toolTom Lane2003-08-04
| | | | so it won't miss 'em again.
* pgindent run.Bruce Momjian2003-08-04
|
* Update copyrights to 2003.Bruce Momjian2003-07-25
| | | | | | | | | print.c: Add one more line to pager calculation to account for the prompt. help.c: Call PageOutput with correct number of lines within slashUsage Add one to line count in helpSQL to account for "Available help:" line. Make copyright match COPYRIGHT file. (Just "1994") Greg Sabino Mullane
* Attached is the complete diff against current CVS.Bruce Momjian2003-06-12
| | | | | | Compiles on BCC 5.5 and VC++ 6.0 (with warnings). Karl Waclawek
* Attached is a patch that enhances the output of psql's HTML mode.Bruce Momjian2003-06-12
| | | | | | | | | | | The output now validates as HTML 4.01 Strict, XHTML 1.0 strict, and XHTML 1.1 (assuming you wrap it in a valid html/body document). It also wraps the output of PGRES_COMMAND_OK if the HTML tag is on, for full compliance: this is why html_escaped_print has to be externalized. Greg Sabino Mullane greg@turnstep.com
* Fix some signed-vs-unsigned-int issues; make print_aligned_verticalTom Lane2003-04-04
| | | | safe for zero-column tables.
* Make the printing code somewhat more independent by not relying onPeter Eisentraut2003-03-18
| | | | | functions and global variables from the rest of psql. Also clean up some data type mismatches created by the last pager patch.
* Avoid malloc(0) when printing a table of no columns. On some platformsTom Lane2002-11-01
| | | | this returns NULL, which confuses the code.
* Fix include files for new PageOutput call.Bruce Momjian2002-10-24
|
* Page \h output and centralize psql paging code in PageOutput().Bruce Momjian2002-10-23
|
* The attached patch fixes a number of issues related to compiling theBruce Momjian2002-10-03
| | | | | | | | | | | | | | | | | | client utilities (libpq.dll and psql.exe) for win32 (missing defines, adjustments to includes, pedantic casting, non-existent functions) per: http://developer.postgresql.org/docs/postgres/install-win32.html. It compiles cleanly under Windows 2000 using Visual Studio .net. Also compiles clean and passes all regression tests (regular and contrib) under Linux. In addition to a review by the usual suspects, it would be very desirable for someone well versed in the peculiarities of win32 to take a look. Joe Conway
* Improve footer length computation for psql.Bruce Momjian2002-09-01
| | | | Greg Sabino Mullan
* backend where a statically sized buffer is written to. Most of theseBruce Momjian2002-08-28
| | | | | | | | | | | should be pretty safe in practice, but it's probably better to be safe than sorry. I was actually looking for cases where NAMEDATALEN is assumed to be 32, but only found one. That's fixed too, as well as a few bits of code cleanup. Neil Conway
* Enable locale, so case conversion (identifier processing) and numberPeter Eisentraut2002-08-27
| | | | | | formatting (\timing) works correctly. Change "Total time" to "Time" since there is nothing that "total" refers to. Remove non-multibyte code.
* The attached patch fixes a tiny memory leak in psql, when usingBruce Momjian2002-07-18
| | | | | | the 'expanded' output mode (\x). Neil Conway
* Fix \? and \pset pager handling. \? wasn't honoring pager before.Bruce Momjian2002-07-15
|
* Don't dump core on empty table.Tom Lane2002-04-24
|
* Fix small problem Tom Lane found with pgindent run.Bruce Momjian2001-10-30
|
* Fix bug with illegal call to calloc.Tatsuo Ishii2001-10-29
|
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-25
| | | | tests pass.
* Commit Patrice's patches except:Tatsuo Ishii2001-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > - corrects a bit the UTF-8 code from Tatsuo to allow Unicode 3.1 > characters (characters with values >= 0x10000, which are encoded on > four bytes). Also, update mb/expected/unicode.out. This is necessary since the patches affetc the result of queries using UTF-8. --------------------------------------------------------------- Hi, I should have sent the patch earlier, but got delayed by other stuff. Anyway, here is the patch: - most of the functionality is only activated when MULTIBYTE is defined, - check valid UTF-8 characters, client-side only yet, and only on output, you still can send invalid UTF-8 to the server (so, it's only partly compliant to Unicode 3.1, but that's better than nothing). - formats with the correct number of columns (that's why I made it in the first place after all), but only for UNICODE. However, the code allows to plug-in routines for other encodings, as Tatsuo did for the other multibyte functions. - corrects a bit the UTF-8 code from Tatsuo to allow Unicode 3.1 characters (characters with values >= 0x10000, which are encoded on four bytes). - doesn't depend on the locale capabilities of the glibc (useful for remote telnet). I would like somebody to check it closely, as it is my first patch to pgsql. Also, I created dummy .orig files, so that the two files I created are included, I hope that's the right way. Now, a lot of functionality is NOT included here, but I will keep that for 7.3 :) That includes all string checking on the server side (which will have to be a bit more optimised ;) ), and the input checking on the client side for UTF-8, though that should not be difficult. It's just to send the strings through mbvalidate() before sending them to the server. Strong checking on UTF-8 strings is mandatory to be compliant with Unicode 3.1+ . Do I have time to look for a patch to include iso-8859-15 for 7.2 ? The euro is coming 1. january 2002 (before 7.3 !) and over 280 millions people in Europe will need the euro sign and only iso-8859-15 and iso-8859-16 have it (and unfortunately, I don't think all Unices will switch to Unicode in the meantime).... err... yes, I know that this is not every single person in Europe that uses PostgreSql, so it's not exactly 280m, but it's just a matter of time ! ;) I'll come back (on pgsql-hackers) later to ask a few questions regarding the full unicode support (normalisation, collation, regexes,...) on the server side :) Here is the patch ! Patrice. -- Patrice HÉDÉ ------------------------------- patrice à islande org ----- -- Isn't it weird how scientists can imagine all the matter of the universe exploding out of a dot smaller than the head of a pin, but they can't come up with a more evocative name for it than "The Big Bang" ? -- What would _you_ call the creation of the universe ? -- "The HORRENDOUS SPACE KABLOOIE !" - Calvin and Hobbes ------------------------------------------ http://www.islande.org/ -----
* Attached ia a patch to enable window size detection code of psql for SolarisBruce Momjian2001-08-01
| | | | | | | | | | | | | | | platform. TIOCGWINSZ is defined as follows: Linux asm/ioctls.h FreeBSD sys/ttycom.h. This file is included by sys/ioctl.h. Solaris sys/termios.h This patch tells print.c to know TIOCGWINSZ on Solaris platform. Same code is founded in src/bin/psal/common.c. Kenji Sugita
* Native Language Support (NLS)Peter Eisentraut2001-06-02
| | | | | | | | | | | Use --enable-nls to turn it on; see installation instructions for details. See developer's guide how to make use of it in programs and how to add translations. psql sources have been almost fully prepared and an incomplete German translation has been provided. In the backend, only elog() calls are currently translatable, and the provided German translation file is more of a placeholder.
* Add command '\pset footer' to psql to turn off default "(x rows)" footer.Peter Eisentraut2001-05-12
|
* pgindent run. Make it all clean.Bruce Momjian2001-03-22
|
* Fix memory leak.Peter Eisentraut2001-03-01
|
* Massive commits for SunOS4 port.Tatsuo Ishii2001-02-27
|
* Restructure the key include files per recent pghackers discussion: thereTom Lane2001-02-10
| | | | | | | | | | | 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.
* Make pgsql compile on FreeBSD-alpha.Bruce Momjian2000-11-16
| | | | | | | | | | | | | | | | | | Context diff this time. Remove -m486 compile args for FreeBSD-i386, compile -O2 on i386. Compile with only -O on alpha for codegen safety. Make the port use the TEST_AND_SET for alpha and i386 on FreeBSD. Fix a lot of bogus string formats for outputting pointers (cast to int and %u/%x replaced with no cast and %p), and 'Size'(size_t) are now cast to 'unsigned long' and output with %lu/ Remove an unused variable. Alfred Perlstein
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-12
|
* Clean up include files use in psql.Bruce Momjian2000-02-16
|
* I checked the WinNT port yesterday (a few days old snapshot from CVS) and IBruce Momjian2000-02-09
| | | | | | | | | | | | | | | | | | | | | | am including a patch to get it compile. changes to psql: - added less as default pager when compiling on Cygwin - need to declare "filename_completion_function" because it is not exported from readline -> added to include/port/win.h changes to pg_id: - include of <getopt.h> - add .exe when installing I think there is a problem with calling the regress tests on WinNT - it should be called with PORTNAME not HOST as the parameter to regress.sh or the check when to add "-h localhost" to psql has to be changed. Now it is checked against the PORTNAME. The results of the regress tests were OK with expected failures ;-) Daniel Horak
* Fixed psql double quoting of SQL idsPeter Eisentraut2000-02-07
| | | | Fixed libpq printing functions
* A few minor psql enhancementsPeter Eisentraut2000-01-29
| | | | | | | 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
* another set of cleanupsPeter Eisentraut2000-01-18
|
* Hi!Bruce Momjian2000-01-18
| | | | | | | | | | | | | | | | | | Here is a patch to bring both libpq and psql to a state where it compiles on win32 (native) again. A lot of things have changed, and I have not been able to keep up with them all, so it has been broken for quite a while. After this patch, at least it compiles. It also talks "basic talk" to the server, but I have not yet tested all things. Sending queries, and using e.g. \d or \dt works fine. The rest will have to be tested further. It also bumps the version on libpq.dll to 7.0. Everything should be enclosed in #ifdef WIN32, unless I have missed something. Except for one or maybe two places where I have moved a #include that should not be used on win32 from the "global area" into a "#ifndef WIN32 area". //Magnus
* Fixed a few "fixes" and bugs. Adjusted messages and options to GNU suggestions.Peter Eisentraut2000-01-12
|
* This should fix the \e (\p, \g, ...) behaviour on an empty query buffer.Bruce Momjian1999-12-10
| | | | | | | | Also, minor tweakage of tab completion, and I hope the output is flushed on time now. -- Peter Eisentraut Sernanders väg 10:115