aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/print.c
Commit message (Collapse)AuthorAge
* Clean up psql's control-C handling to avoid longjmp'ing out of randomTom Lane2006-06-14
| | | | | | | | | places --- that risks corrupting data structures, losing sync with the backend, etc. We now longjmp only from calls to readline, fgets, and fread, which we assume are coded to protect themselves against interrupts at undesirable times. This requires adding explicit tests for cancel_pressed in long-running loops, but on the whole it's far cleaner. Martijn van Oosterhout and Tom Lane.
* Prepare code to be built by MSVC:Bruce Momjian2006-06-07
| | | | | | | | | | o remove many WIN32_CLIENT_ONLY defines o add WIN32_ONLY_COMPILER define o add 3rd argument to open() for portability o add include/port/win32_msvc directory for system includes Magnus Hagander
* Update copyright for 2006. Update scripts.Bruce Momjian2006-03-05
|
* ' is not valid HTML 4.01, so print the plain character instead.Peter Eisentraut2006-02-18
|
* Restore previous psql behavior of not printing useless trailing spacesTom Lane2006-02-12
| | | | after the data in the last column on a line.
* Clean up signedness warnings and 64-bit bugs in recent psql printingTom Lane2006-02-10
| | | | patch. Martijn van Oosterhout and Tom Lane
* Fix psql after newline patch for calloc(0).Bruce Momjian2006-02-10
| | | | Kris Jurka
* Allow psql multi-line column values to align in the proper columnsBruce Momjian2006-02-10
| | | | | | | | | | | | | | | | | | | | | | | If the second output column value is 'a\nb', the 'b' should appear in the second display column, rather than the first column as it does now. Change libpq's PQdsplen() to return more useful values. > Note: this changes the PQdsplen function, it can now return zero or > minus one which was not possible before. It doesn't appear anyone is > actually using the functions other than psql but it is a change. The > functions are not actually documentated anywhere so it's not like we're > breaking a defined interface. The new semantics follow the Unicode > standard. BACKWARD COMPATIBLE CHANGE. The only user-visible change I saw in the regression tests is that a SELECT * on a table where all the columns have been dropped doesn't return a blank line like before. This seems like a step forward. Martijn van Oosterhout
* Disable expanded mode only for \d tablename, not for all backslashBruce Momjian2005-10-27
| | | | commands. Per complaint that \df+ is clearer in expanded mode.
* Standard pgindent run for 8.1.Bruce Momjian2005-10-15
|
* Clean up some messages and fix missing translation support. Option --logPeter Eisentraut2005-10-04
| | | | renamed to --log-file for clarity.
* Fix incorrect psql \x memory allocation for numericlocale. Redesign APIBruce Momjian2005-09-27
| | | | to be less error-prone.
* Rename variable for clarity.Bruce Momjian2005-09-26
|
* Suppress signed-vs-unsigned-char warnings.Tom Lane2005-09-24
|
* Fix psql \x by removing puts().Bruce Momjian2005-09-22
| | | | Greg Sabino Mullane
* \pset numericsep -> numericlocale.Bruce Momjian2005-07-18
|
* Fix len so decimal length is only added when a period appears in the output.Bruce Momjian2005-07-18
|
* Fix numiericsep length computations.Bruce Momjian2005-07-18
| | | | Eugen Nedelcu
* Enable multi-byte thousands_sep and decimal_point for numericsep.Bruce Momjian2005-07-14
|
* Make better thousands_sep default based on decimal marker value.Bruce Momjian2005-07-14
|
* Change numericsep to a boolean, and make it locale-aware.Bruce Momjian2005-07-14
|
* Add numeric separator support for latex and troff output methods.Bruce Momjian2005-07-14
|
* barebones variable name -> tuples_only, for consistency.Bruce Momjian2005-07-14
|
* Fix malloc length for new numeric separator patch.Bruce Momjian2005-07-14
| | | | Centralize malloc into function.
* Reverse pg_malloc patch because psql/print.c is used in scripts filesBruce Momjian2005-07-10
| | | | that don't have pg_malloc.
* Use failure-safe pg_malloc consistently in psql/print.c.Bruce Momjian2005-07-10
|
* Add psql \pset numericsep to allow output numbers like 100,000.0 orBruce Momjian2005-07-10
| | | | | | 100.000,0. Eugen Nedelcu
* Use ' ' escapes for leading spaces in table values, for use inBruce Momjian2005-06-14
| | | | | | EXPLAIN output. Jean-Paul Argudo
* Add -L option to psql to log sessions.Bruce Momjian2005-06-14
| | | | Lorne Sunley
* Per discussion on -hackers, this patch changes psql's "expanded" outputNeil Conway2005-06-13
| | | | | | 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.
* \(rs should be \\(rs, per Tom.Bruce Momjian2005-06-09
|
* I've created a patch which adds support for troff "-ms" output toBruce Momjian2005-06-09
| | | | | | | | | | | | | | | | | | | | | | | 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
* Use _() macro consistently rather than gettext(). Add translationBruce Momjian2005-02-22
| | | | macros around strings that were missing them.
* 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