Re: [HACKERS] psql and output from \?

2002-03-18 Thread Bruce Momjian


Patch applied.  Thanks.

---



Ian Barwick wrote:
 On Thursday 14 March 2002 22:40, Bruce Momjian wrote:
I guess some of these weren't introduces by you, but if someone is
going to fix this, he might as well take care of these.
  
   Will submit another patch in the morning (it's late here).
 
  Ian, do you have another version of this patch ready?
 
 Patch attached (diff against CVS, replacing previous patch).
 
 Ian Barwick

[ Attachment, skipping... ]

 
 ---(end of broadcast)---
 TIP 6: Have you searched our list archives?
 
 http://archives.postgresql.org

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 853-3000
  +  If your life is a hard drive, |  830 Blythe Avenue
  +  Christ can be your backup.|  Drexel Hill, Pennsylvania 19026

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] psql and output from \?

2002-03-15 Thread Bruce Momjian


Your patch has been added to the PostgreSQL unapplied patches list at:

http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---


Ian Barwick wrote:
 On Thursday 14 March 2002 22:40, Bruce Momjian wrote:
I guess some of these weren't introduces by you, but if someone is
going to fix this, he might as well take care of these.
  
   Will submit another patch in the morning (it's late here).
 
  Ian, do you have another version of this patch ready?
 
 Patch attached (diff against CVS, replacing previous patch).
 
 Ian Barwick

[ Attachment, skipping... ]

 
 ---(end of broadcast)---
 TIP 6: Have you searched our list archives?
 
 http://archives.postgresql.org

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 853-3000
  +  If your life is a hard drive, |  830 Blythe Avenue
  +  Christ can be your backup.|  Drexel Hill, Pennsylvania 19026

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] psql and output from \?

2002-03-14 Thread Bruce Momjian

  I guess some of these weren't introduces by you, but if someone is going
  to fix this, he might as well take care of these.
 
 Will submit another patch in the morning (it's late here).

Ian, do you have another version of this patch ready?

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 853-3000
  +  If your life is a hard drive, |  830 Blythe Avenue
  +  Christ can be your backup.|  Drexel Hill, Pennsylvania 19026

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] psql and output from \?

2002-03-14 Thread Ian Barwick

On Thursday 14 March 2002 22:40, Bruce Momjian wrote:
   I guess some of these weren't introduces by you, but if someone is
   going to fix this, he might as well take care of these.
 
  Will submit another patch in the morning (it's late here).

 Ian, do you have another version of this patch ready?

Patch attached (diff against CVS, replacing previous patch).

Ian Barwick

Index: help.c
===
RCS file: /projects/cvsroot/pgsql/src/bin/psql/help.c,v
retrieving revision 1.48
diff -c -r1.48 help.c
*** help.c	2002/03/11 18:26:20	1.48
--- help.c	2002/03/14 22:25:22
***
*** 177,183 
  	if (pset.notty == 0 
  		(pagerenv = getenv("PAGER")) 
  		(pagerenv[0] != '\0') 
! 		screen_size.ws_row = 39 
  		(fout = popen(pagerenv, "w")))
  	{
  		usePipe = true;
--- 177,183 
  	if (pset.notty == 0 
  		(pagerenv = getenv("PAGER")) 
  		(pagerenv[0] != '\0') 
! 		screen_size.ws_row = 46 
  		(fout = popen(pagerenv, "w")))
  	{
  		usePipe = true;
***
*** 189,242 
  		fout = stdout;
  
  	/* if you add/remove a line here, change the row test above */
  	fprintf(fout, _(" \\a toggle between unaligned and aligned output mode\n"));
  	fprintf(fout, _(" \\c[onnect] [DBNAME|- [USER]]\n"
! 		 "connect to new database (currently \"%s\")\n"),
  			PQdb(pset.db));
! 	fprintf(fout, _(" \\C [TITLE] set table title, or unset with no title\n"));
  	fprintf(fout, _(" \\cd [DIR]  change the current working directory\n"));
  	fprintf(fout, _(" \\copy ...  perform SQL COPY with data stream to the client host\n"));
  	fprintf(fout, _(" \\copyright show PostgreSQL usage and distribution terms\n"));
! 	fprintf(fout, _(" \\d [TABLE] describe table (or view, index, sequence)\n"));
! 	fprintf(fout, _(" \\d{t|i|s|v}... list tables/indexes/sequences/views\n"));
! 	fprintf(fout, _(" \\d{p|S|l}  list access privileges, system tables, or large objects\n"));
! 	fprintf(fout, _(" \\dalist aggregate functions\n"));
! 	fprintf(fout, _(" \\dd [NAME] show comment for table, type, function, or operator\n"));
! 	fprintf(fout, _(" \\dflist functions\n"));
! 	fprintf(fout, _(" \\dolist operators\n"));
! 	fprintf(fout, _(" \\dTlist data types\n"));
! 	fprintf(fout, _(" \\du [PATTERN]  lists all configured users or only those that match pattern\n"));
! 	fprintf(fout, _(" \\e [FILE]  edit the query buffer or file with external editor\n"));
! 	fprintf(fout, _(" \\echo TEXT write text to standard output\n"));
! 	fprintf(fout, _(" \\encoding ENCODING  set client encoding\n"));
! 	fprintf(fout, _(" \\f [SEPARATOR] set field separator, or unset if none\n"));
! 	fprintf(fout, _(" \\g [FILE]  send SQL command to server (and write results to file or |pipe)\n"));
! 	fprintf(fout, _(" \\h NAMEhelp on syntax of SQL commands, * for all commands\n"));
  	fprintf(fout, _(" \\H toggle HTML output mode (currently %s)\n"),
  			ON(pset.popt.topt.format == PRINT_HTML));
  	fprintf(fout, _(" \\i FILEexecute commands from file\n"));
  	fprintf(fout, _(" \\l list all databases\n"));
  	fprintf(fout, _(" \\lo_export, \\lo_import, \\lo_list, \\lo_unlink\n"
! 	" large object operations\n"));
  	fprintf(fout, _(" \\o FILEsend all query results to file or |pipe\n"));
! 	fprintf(fout, _(" \\p show the content of the query buffer\n"));
! 	fprintf(fout, _(" \\pset VAR  set table output option (VAR := {format|border|expanded|\n"
! 	" fieldsep|null|recordsep|tuples_only|title|tableattr|pager})\n"));
  	fprintf(fout, _(" \\q quit psql\n"));
! 	fprintf(fout, _(" \\qecho TEXTwrite text to query output stream (see \\o)\n"));
  	fprintf(fout, _(" \\r reset (clear) the query buffer\n"));
! 	fprintf(fout, _(" \\s [FILE]  print history or save it to file\n"));
! 	fprintf(fout, _(" \\set NAME VALUE  set internal variable\n"));
  	fprintf(fout, _(" \\t show only rows (currently %s)\n"),
  			ON(pset.popt.topt.tuples_only));
! 	fprintf(fout, _(" \\T [TAG_ATTR]  set HTML table tag attributes, or unset if none\n"));
  	fprintf(fout, _(" \\timingtoggle timing of queries (currently %s)\n"),
  			ON(pset.timing));
  	fprintf(fout, _(" \\unset NAMEunset (delete) internal variable\n"));
! 	fprintf(fout, _(" \\w FILEwrite query buffer to file\n"));
  	fprintf(fout, _(" \\x toggle expanded output (currently %s)\n"),
  			ON(pset.popt.topt.expanded));
! 	fprintf(fout, _(" \\z list table access privileges\n"));
  	fprintf(fout, _(" \\! [COMMAND]   execute command in shell or start interactive shell\n"));
  
  	if (usePipe)
--- 189,245 
  		fout = stdout;
  
  	/* if you add/remove a line here, change the row test above */
+ /*  if this " is the start of the string then it ought to end there to fit in