Not to to confusing

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: Not to to confusing
Date: 2005-04-12 03:05:06
Message-ID: 3a70ceae8e4283cbf0350fb22d4668e2@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


-----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-----

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-04-12 05:28:31 Re: Not to to confusing
Previous Message Greg Sabino Mullane 2005-04-12 03:00:13 Remove unneeded left joins from psql