Skip to content

Commit e0275c3

Browse files
committed
psql: Tab completion for ALTER TYPE ... ADD ATTRIBUTE
Improve psql tab completion for ALTER TYPE ... ADD ATTRIBUTE to offer a list of existing data types (until now no options were offered). Author: Kirill Reshke Reviewed-By: Karina Litskevich Discussion: https://postgr.es/m/CALdSSPhVELkvutquqrDB=Ujfq_Pjz=6jn-kzh+291KPNViLTfw@mail.gmail.com
1 parent 1dfeb6a commit e0275c3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/bin/psql/tab-complete.in.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2999,6 +2999,9 @@ match_previous_words(int pattern_id,
29992999
*/
30003000
else if (Matches("ALTER", "TYPE", MatchAny, "ALTER|DROP|RENAME", "ATTRIBUTE"))
30013001
COMPLETE_WITH_ATTR(prev3_wd);
3002+
/* complete ALTER TYPE ADD ATTRIBUTE <foo> with list of types */
3003+
else if (Matches("ALTER", "TYPE", MatchAny, "ADD", "ATTRIBUTE", MatchAny))
3004+
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_datatypes);
30023005
/* ALTER TYPE ALTER ATTRIBUTE <foo> */
30033006
else if (Matches("ALTER", "TYPE", MatchAny, "ALTER", "ATTRIBUTE", MatchAny))
30043007
COMPLETE_WITH("TYPE");

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy