Allow semicolons in psql \h strings
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message
A minor itch I finally got around to scratching:
allow semicolons at the end of help topics
(also bump copyright years (should really be done for all files))
--
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200408042143
Index: help.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/help.c,v
retrieving revision 1.90
diff -c -r1.90 help.c
*** help.c 15 Jul 2004 03:56:06 -0000 1.90
--- help.c 4 Aug 2004 19:01:41 -0000
***************
*** 1,7 ****
/*
* psql - the PostgreSQL interactive terminal
*
! * Copyright (c) 2000-2003, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql-server/src/bin/psql/help.c,v 1.90 2004/07/15 03:56:06 momjian Exp $
*/
--- 1,7 ----
/*
* psql - the PostgreSQL interactive terminal
*
! * Copyright (c) 2000-2004, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql-server/src/bin/psql/help.c,v 1.90 2004/07/15 03:56:06 momjian Exp $
*/
***************
*** 310,318 ****
int nl_count = 0;
char *ch;
! /* don't care about trailing spaces */
len = strlen(topic);
! while (topic[len - 1] == ' ')
len--;
/* Count newlines for pager */
--- 310,318 ----
int nl_count = 0;
char *ch;
! /* don't care about trailing spaces or semicolons */
len = strlen(topic);
! while (' ' == topic[len - 1] || ';' == topic[len - 1])
len--;
/* Count newlines for pager */
***************
*** 372,378 ****
{
puts(
"PostgreSQL Data Base Management System\n\n"
! "Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group\n\n"
"This software is based on Postgres95, formerly known as Postgres, which\n"
"contains the following notice:\n\n"
"Portions Copyright(c) 1994, Regents of the University of California\n\n"
--- 372,378 ----
{
puts(
"PostgreSQL Data Base Management System\n\n"
! "Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group\n\n"
"This software is based on Postgres95, formerly known as Postgres, which\n"
"contains the following notice:\n\n"
"Portions Copyright(c) 1994, Regents of the University of California\n\n"
-----BEGIN PGP SIGNATURE-----
iD8DBQFBEZFlvJuQZxSWSsgRAlLIAKD7GNhFDkbOa8DZNSKhU5Z8rDymtwCfQiWG
fRTYcra52IDgDbIeoChj3k0=
=hkdw
-----END PGP SIGNATURE-----
"Greg Sabino Mullane" <greg@turnstep.com> writes:
(also bump copyright years (should really be done for all files))
Bruce has a script for that.
regards, tom lane
Cleaned up version applied.
---------------------------------------------------------------------------
Greg Sabino Mullane wrote:
[ There is text before PGP section. ]
[ PGP not available, raw data follows ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this messageA minor itch I finally got around to scratching:
allow semicolons at the end of help topics
(also bump copyright years (should really be done for all files))--
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200408042143Index: help.c =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/help.c,v retrieving revision 1.90 diff -c -r1.90 help.c *** help.c 15 Jul 2004 03:56:06 -0000 1.90 --- help.c 4 Aug 2004 19:01:41 -0000 *************** *** 1,7 **** /* * psql - the PostgreSQL interactive terminal * ! * Copyright (c) 2000-2003, PostgreSQL Global Development Group * * $PostgreSQL: pgsql-server/src/bin/psql/help.c,v 1.90 2004/07/15 03:56:06 momjian Exp $ */ --- 1,7 ---- /* * psql - the PostgreSQL interactive terminal * ! * Copyright (c) 2000-2004, PostgreSQL Global Development Group * * $PostgreSQL: pgsql-server/src/bin/psql/help.c,v 1.90 2004/07/15 03:56:06 momjian Exp $ */ *************** *** 310,318 **** int nl_count = 0; char *ch;! /* don't care about trailing spaces */
len = strlen(topic);
! while (topic[len - 1] == ' ')
len--;/* Count newlines for pager */ --- 310,318 ---- int nl_count = 0; char *ch;! /* don't care about trailing spaces or semicolons */
len = strlen(topic);
! while (' ' == topic[len - 1] || ';' == topic[len - 1])
len--;/* Count newlines for pager */ *************** *** 372,378 **** { puts( "PostgreSQL Data Base Management System\n\n" ! "Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group\n\n" "This software is based on Postgres95, formerly known as Postgres, which\n" "contains the following notice:\n\n" "Portions Copyright(c) 1994, Regents of the University of California\n\n" --- 372,378 ---- { puts( "PostgreSQL Data Base Management System\n\n" ! "Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group\n\n" "This software is based on Postgres95, formerly known as Postgres, which\n" "contains the following notice:\n\n" "Portions Copyright(c) 1994, Regents of the University of California\n\n"-----BEGIN PGP SIGNATURE-----
iD8DBQFBEZFlvJuQZxSWSsgRAlLIAKD7GNhFDkbOa8DZNSKhU5Z8rDymtwCfQiWG
fRTYcra52IDgDbIeoChj3k0=
=hkdw
-----END PGP SIGNATURE--------------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
[ Decrypting message... End of raw data. ]
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073