summaryrefslogtreecommitdiff
path: root/src/bin/psql/print.c
AgeCommit message (Collapse)Author
2006-02-12Restore previous psql behavior of not printing useless trailing spacesTom Lane
after the data in the last column on a line.
2006-02-10Clean up signedness warnings and 64-bit bugs in recent psql printingTom Lane
patch. Martijn van Oosterhout and Tom Lane
2006-02-10Fix psql after newline patch for calloc(0).Bruce Momjian
Kris Jurka
2006-02-10Allow psql multi-line column values to align in the proper columnsBruce Momjian
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
2005-10-27Disable expanded mode only for \d tablename, not for all backslashBruce Momjian
commands. Per complaint that \df+ is clearer in expanded mode.
2005-10-15Standard pgindent run for 8.1.Bruce Momjian
2005-10-04Clean up some messages and fix missing translation support. Option --logPeter Eisentraut
renamed to --log-file for clarity.
2005-09-27Fix incorrect psql \x memory allocation for numericlocale. Redesign APIBruce Momjian
to be less error-prone.
2005-09-26Rename variable for clarity.Bruce Momjian
2005-09-24Suppress signed-vs-unsigned-char warnings.Tom Lane
2005-09-22Fix psql \x by removing puts().Bruce Momjian
Greg Sabino Mullane
2005-07-18\pset numericsep -> numericlocale.Bruce Momjian
2005-07-18Fix len so decimal length is only added when a period appears in the output.Bruce Momjian
2005-07-18Fix numiericsep length computations.Bruce Momjian
Eugen Nedelcu
2005-07-14Enable multi-byte thousands_sep and decimal_point for numericsep.Bruce Momjian
2005-07-14Make better thousands_sep default based on decimal marker value.Bruce Momjian
2005-07-14Change numericsep to a boolean, and make it locale-aware.Bruce Momjian
2005-07-14Add numeric separator support for latex and troff output methods.Bruce Momjian
2005-07-14barebones variable name -> tuples_only, for consistency.Bruce Momjian
2005-07-14Fix malloc length for new numeric separator patch.Bruce Momjian
Centralize malloc into function.
2005-07-10Reverse pg_malloc patch because psql/print.c is used in scripts filesBruce Momjian
that don't have pg_malloc.
2005-07-10Use failure-safe pg_malloc consistently in psql/print.c.Bruce Momjian
2005-07-10Add psql \pset numericsep to allow output numbers like 100,000.0 orBruce Momjian
100.000,0. Eugen Nedelcu
2005-06-14Use ' ' escapes for leading spaces in table values, for use inBruce Momjian
EXPLAIN output. Jean-Paul Argudo
2005-06-14Add -L option to psql to log sessions.Bruce Momjian
Lorne Sunley
2005-06-13Per discussion on -hackers, this patch changes psql's "expanded" outputNeil Conway
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.
2005-06-09\(rs should be \\(rs, per Tom.Bruce Momjian
2005-06-09I've created a patch which adds support for troff "-ms" output toBruce Momjian
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
2005-02-22Use _() macro consistently rather than gettext(). Add translationBruce Momjian
macros around strings that were missing them.
2005-01-01Update copyrights that were missed.Bruce Momjian
2004-11-09Get rid of perror(), substitute some better phrased error messages.Peter Eisentraut
malloc() doesn't set errno, so most uses were buggy anyway.
2004-09-27Add new macro as shorthand for MS VC and Borland C++:Bruce Momjian
+ #if defined(_MSC_VER) || defined(__BORLANDC__) + #define WIN32_CLIENT_ONLY + #endif
2004-08-29Pgindent run for 8.0.Bruce Momjian
2004-08-29Update copyright to 2004.Bruce Momjian
2004-08-06I have noticed that the latex format in psql has some bugs:Bruce Momjian
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
2004-05-23A few cosmetic fixes and code cleanup.Neil Conway
2004-05-18Move find_my_exec() way up into main.c so it is available to theBruce Momjian
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.
2004-01-24Revert the change to print.c, as this breaks src/bin/scripts. The properNeil Conway
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.
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().
2003-11-29$Header: -> $PostgreSQL Changes ...PostgreSQL Daemon
2003-08-14Someone moved PageOutput here from common.c, but forgot to move allTom Lane
the #includes it depends on.
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-07-25Update copyrights to 2003.Bruce Momjian
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
2003-06-12Attached is the complete diff against current CVS.Bruce Momjian
Compiles on BCC 5.5 and VC++ 6.0 (with warnings). Karl Waclawek
2003-06-12Attached is a patch that enhances the output of psql's HTML mode.Bruce Momjian
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
2003-04-04Fix some signed-vs-unsigned-int issues; make print_aligned_verticalTom Lane
safe for zero-column tables.
2003-03-18Make the printing code somewhat more independent by not relying onPeter Eisentraut
functions and global variables from the rest of psql. Also clean up some data type mismatches created by the last pager patch.
2002-11-01Avoid malloc(0) when printing a table of no columns. On some platformsTom Lane
this returns NULL, which confuses the code.
2002-10-24Fix include files for new PageOutput call.Bruce Momjian