mirror of
https://github.com/postgres/postgres.git
synced 2025-05-28 00:03:23 -04:00
Fix for TAB completion using GRANT DELETE in psql.
Oliver Elphick
This commit is contained in:
parent
6b9e742458
commit
dbbd13bdb5
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright 2000 by PostgreSQL Global Development Group
|
* Copyright 2000 by PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.48 2002/04/11 20:00:09 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.49 2002/06/15 19:43:47 momjian Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
@ -498,10 +498,11 @@ psql_completion(char *text, int start, int end)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Complete DELETE with FROM (only if the word before that is not "ON"
|
* Complete DELETE with FROM (only if the word before that is not "ON"
|
||||||
* (cf. rules) or "BEFORE" or "AFTER" (cf. triggers) )
|
* (cf. rules) or "BEFORE" or "AFTER" (cf. triggers) or GRANT)
|
||||||
*/
|
*/
|
||||||
else if (strcasecmp(prev_wd, "DELETE") == 0 &&
|
else if (strcasecmp(prev_wd, "DELETE") == 0 &&
|
||||||
!(strcasecmp(prev2_wd, "ON") == 0 ||
|
!(strcasecmp(prev2_wd, "ON") == 0 ||
|
||||||
|
strcasecmp(prev2_wd, "GRANT") == 0 ||
|
||||||
strcasecmp(prev2_wd, "BEFORE") == 0 ||
|
strcasecmp(prev2_wd, "BEFORE") == 0 ||
|
||||||
strcasecmp(prev2_wd, "AFTER") == 0))
|
strcasecmp(prev2_wd, "AFTER") == 0))
|
||||||
COMPLETE_WITH_CONST("FROM");
|
COMPLETE_WITH_CONST("FROM");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user