Skip site navigation (1) Skip section navigation (2)

Re: Not to to confusing

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Not to to confusing
Date: 2005-05-25 22:12:48
Message-ID: 200505252212.j4PMCmL16134@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Patch applied, with adjustment recommended by Tom.

> In order to be somewhat consistent and not too confusing, could we
> spell that as 'pg_strcasecmp(prev_wd, "TO") != 0' please?

---------------------------------------------------------------------------

Greg Sabino Mullane wrote:
[ There is text before PGP section. ]
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> Quick patch to adress a recent concern on the mailing list
> about adding an errant "TO" when we already have a TO. Since
> TO cannot be a valid column name (we must quote it), we can
> simply ignore the tab-completion if the previous word
> was a "TO"
> 
> - --
> Greg Sabino Mullane greg(at)turnstep(dot)com
> PGP Key: 0x14964AC8 200504112303
> http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
> 
> Index: tab-complete.c
> ===================================================================
> RCS file: /projects/cvsroot/pgsql/src/bin/psql/tab-complete.c,v
> retrieving revision 1.124
> diff -c -r1.124 tab-complete.c
> *** tab-complete.c      7 Apr 2005 01:51:39 -0000       1.124
> - --- tab-complete.c    11 Apr 2005 16:17:07 -0000
> ***************
> *** 820,826 ****
>    
>         /* ALTER TABLE xxx RENAME yyy */
>         else if (pg_strcasecmp(prev4_wd, "TABLE") == 0 &&
> !                        pg_strcasecmp(prev2_wd, "RENAME") == 0)
>                 COMPLETE_WITH_CONST("TO");
>    
>         /* If we have TABLE <sth> DROP, provide COLUMN or CONSTRAINT */
> - --- 820,827 ----
>    
>         /* ALTER TABLE xxx RENAME yyy */
>         else if (pg_strcasecmp(prev4_wd, "TABLE") == 0 &&
> !                        pg_strcasecmp(prev2_wd, "RENAME") == 0 &&
> !                                        pg_strcasecmp(prev_wd, "TO"))
>                 COMPLETE_WITH_CONST("TO");
>    
>         /* If we have TABLE <sth> DROP, provide COLUMN or CONSTRAINT */
> 
> -----BEGIN PGP SIGNATURE-----
> 
> iD8DBQFCWzrJvJuQZxSWSsgRAlWgAJ9HkwLfDTkLngWvQQH0qXspAHZSgACgrZvj
> sjqcPohL54+0eDSlUQDQADc=
> =iyxJ
> -----END PGP SIGNATURE-----
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
>                http://archives.postgresql.org
> 

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

In response to

pgsql-patches by date

Next:From: Bruce MomjianDate: 2005-05-25 22:58:46
Subject: Re: wchareq improvement
Previous:From: Bruce MomjianDate: 2005-05-25 21:58:58
Subject: Addition of macro parentheses

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group