Not to to confusing

Поиск
Список
Период
Сортировка
От Greg Sabino Mullane
Тема Not to to confusing
Дата
Msg-id 3a70ceae8e4283cbf0350fb22d4668e2@biglumber.com
обсуждение исходный текст
Ответы Re: Not to to confusing  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Not to to confusing  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список 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@turnstep.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-----



В списке pgsql-patches по дате отправления:

Предыдущее
От: Greg Sabino Mullane
Дата:
Сообщение: Remove unneeded left joins from psql
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Not to to confusing