Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita6699f6

Browse files
committed
Attached are two patches for psql's tab-completion.c.
The first cleans up a couple of minor errors and ommissionsand adds tab completion support to more slash commands, e.g.\dv.The second is an attempt to add tab completion for schemasand fully qualified relation names (e.g. public.mytable ).I think this covers the TODO-item:"Allow psql to do table completion for SELECT * FROM schema_part and tablecompletion for SELECT * FROM schema_name."This happens via union selects querying: - relation_name in current search path; - schema_name; - schema.relation_namematching the current input string.E.g: SELECT p[TAB]will produce a list of all appropriate relation names in the current searchpath which begin with 'p', and also all schema names which begin with 'p'; \d pub[TAB]will produce any relation names in the current search path and alsoany schema names beginning with 'pub'; \d public.[TAB]will produce a list of all relations in the schema 'public'; \d public.my[TAB]produces all relation names beginning with 'my' in schema 'public'.It seems to work for me; comments, suggestions, particularly regardingthe coding and queries, are very welcome.Note that tables, indexes, views and sequences relations in the'pg_catalog' namespace are excluded even though they are inthe current search path. I found not doing this produced annoying behaviourwhen expanding names beginning with 'p'. People who work with systemtables a lot may not like this though; I can look for another solutionif necessary.Ian Barwick
1 parent9d6f5ee commita6699f6

File tree

1 file changed

+433
-73
lines changed

1 file changed

+433
-73
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp