Re: [PATCHES] Warning for psql history not supported

2004-10-06 Thread Bruce Momjian

I changed it to "history is not supported".

---

Bruce Momjian wrote:
> Peter Eisentraut wrote:
> > Bruce Momjian wrote:
> > > Here is an applied patch that suppresses psql \s help display for
> > > platforms like Win32 that don't typically install with readline.
> > > It also prints and error if you try to access it.
> > 
> > But "history is not supported on this platform" is not really true, is 
> > it?
> 
> No, not really, but that's what we say when we can't create a symlink so
> I used the same wording.  What would be the proper wording?  I couldn't
> find another example.
> 
> -- 
>   Bruce Momjian|  http://candle.pha.pa.us
>   [EMAIL PROTECTED]   |  (610) 359-1001
>   +  If your life is a hard drive, |  13 Roberts Road
>   +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073
> 
> ---(end of broadcast)---
> TIP 8: explain analyze is your friend
> 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


Re: [PATCHES] Warning for psql history not supported

2004-10-06 Thread Bruce Momjian
Peter Eisentraut wrote:
> Bruce Momjian wrote:
> > Here is an applied patch that suppresses psql \s help display for
> > platforms like Win32 that don't typically install with readline.
> > It also prints and error if you try to access it.
> 
> But "history is not supported on this platform" is not really true, is 
> it?

No, not really, but that's what we say when we can't create a symlink so
I used the same wording.  What would be the proper wording?  I couldn't
find another example.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [PATCHES] Warning for psql history not supported

2004-10-06 Thread Peter Eisentraut
Bruce Momjian wrote:
> Here is an applied patch that suppresses psql \s help display for
> platforms like Win32 that don't typically install with readline.
> It also prints and error if you try to access it.

But "history is not supported on this platform" is not really true, is 
it?

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


[PATCHES] Warning for psql history not supported

2004-10-06 Thread Bruce Momjian
Here is an applied patch that suppresses psql \s help display for
platforms like Win32 that don't typically install with readline.
It also prints and error if you try to access it.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073
Index: doc/src/sgml/ref/psql-ref.sgml
===
RCS file: /cvsroot/pgsql-server/doc/src/sgml/ref/psql-ref.sgml,v
retrieving revision 1.122
diff -c -c -r1.122 psql-ref.sgml
*** doc/src/sgml/ref/psql-ref.sgml  20 Sep 2004 18:51:17 -  1.122
--- doc/src/sgml/ref/psql-ref.sgml  6 Oct 2004 18:34:40 -
***
*** 1603,1609 
  class="parameter">filename is omitted, the history
  is written to the standard output. This option is only available
  if psql is configured to use the
! GNU history library.
  
  
  
--- 1603,1609 
  class="parameter">filename is omitted, the history
  is written to the standard output. This option is only available
  if psql is configured to use the
! GNU readline (or history) library.
  
  
  
Index: src/bin/psql/help.c
===
RCS file: /cvsroot/pgsql-server/src/bin/psql/help.c,v
retrieving revision 1.93
diff -c -c -r1.93 help.c
*** src/bin/psql/help.c 29 Aug 2004 05:06:54 -  1.93
--- src/bin/psql/help.c 6 Oct 2004 18:34:44 -
***
*** 194,200 
--- 194,202 
fprintf(output, _("  \\g [FILE]  send query buffer to server (and results 
to file or |pipe)\n"));
fprintf(output, _("  \\p show the contents of the query 
buffer\n"));
fprintf(output, _("  \\r reset (clear) the query buffer\n"));
+ #ifdef USE_READLINE
fprintf(output, _("  \\s [FILE]  display history or save it to file\n"));
+ #endif
fprintf(output, _("  \\w FILEwrite query buffer to file\n"));
fprintf(output, "\n");
  
Index: src/bin/psql/input.c
===
RCS file: /cvsroot/pgsql-server/src/bin/psql/input.c,v
retrieving revision 1.38
diff -c -c -r1.38 input.c
*** src/bin/psql/input.c27 Sep 2004 19:16:02 -  1.38
--- src/bin/psql/input.c6 Oct 2004 18:34:44 -
***
*** 209,214 
--- 209,216 
  
psql_error("could not save history to file \"%s\": %s\n", fname, 
strerror(errno));
}
+ #else
+   psql_error("history is not supported on this platform\n");
  #endif
  
return false;

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org