Open tobwen opened 4 years ago
Are the PostGIS functions scoped under a schema? If so, you will have to qualify your query with the schema name.
SELECT * FROM schema.func_name
Alternatively, I just merged a PR #1266 to include functions from a schema that is present in the search_path. You can install directly from master and give it a shot.
pip install -U https://github.com/dbcli/pgcli/archive/refs/heads/master.zip
Description
I've installed extension PostGIS, but cannot autocomplete its functions. Is this possible at all?
Your environment
pgcli --version
Version: 3.0.0
- build bcb0c8bce776a5eba9f5425c57c2ec8385f10e94system
Debian Buster with latest updates, Kernel 5.4.0-0.bpo.4-amd64
dpkg --list | grep postgresql
pip3 freeze
cat ~/.config/pgcli/config (unchanged)
extend me
``` python # vi: ft=dosini [main] # Enables context sensitive auto-completion. If this is disabled the all # possible completions will be listed. smart_completion = True # Display the completions in several columns. (More completions will be # visible.) wider_completion_menu = False # Multi-line mode allows breaking up the sql statements into multiple lines. If # this is set to True, then the end of the statements must have a semi-colon. # If this is set to False then sql statements can't be split into multiple # lines. End of line (return) is considered as the end of the statement. multi_line = False # If multi_line_mode is set to "psql", in multi-line mode, [Enter] will execute # the current input if the input ends in a semicolon. # If multi_line_mode is set to "safe", in multi-line mode, [Enter] will always # insert a newline, and [Esc] [Enter] or [Alt]-[Enter] must be used to execute # a command. multi_line_mode = psql # Destructive warning mode will alert you before executing a sql statement # that may cause harm to the database such as "drop table", "drop database" # or "shutdown". destructive_warning = True # Enables expand mode, which is similar to `\x` in psql. expand = False # Enables auto expand mode, which is similar to `\x auto` in psql. auto_expand = False # If set to True, table suggestions will include a table alias generate_aliases = False # log_file location. # In Unix/Linux: ~/.config/pgcli/log # In Windows: %USERPROFILE%\AppData\Local\dbcli\pgcli\log # %USERPROFILE% is typically C:\Users\{username} log_file = default # keyword casing preference. Possible values "lower", "upper", "auto" keyword_casing = auto # casing_file location. # In Unix/Linux: ~/.config/pgcli/casing # In Windows: %USERPROFILE%\AppData\Local\dbcli\pgcli\casing # %USERPROFILE% is typically C:\Users\{username} casing_file = default # If generate_casing_file is set to True and there is no file in the above # location, one will be generated based on usage in SQL/PLPGSQL functions. generate_casing_file = False # Casing of column headers based on the casing_file described above case_column_headers = True # history_file location. # In Unix/Linux: ~/.config/pgcli/history # In Windows: %USERPROFILE%\AppData\Local\dbcli\pgcli\history # %USERPROFILE% is typically C:\Users\{username} history_file = default # Default log level. Possible values: "CRITICAL", "ERROR", "WARNING", "INFO" # and "DEBUG". "NONE" disables logging. log_level = INFO # Order of columns when expanding * to column list # Possible values: "table_order" and "alphabetic" asterisk_column_order = table_order # Whether to qualify with table alias/name when suggesting columns # Possible values: "always", never" and "if_more_than_one_table" qualify_columns = if_more_than_one_table # When no schema is entered, only suggest objects in search_path search_path_filter = False # Default pager. # By default 'PAGER' environment variable is used # pager = less -SRXF # Timing of sql statments and table rendering. timing = True # Table format. Possible values: psql, plain, simple, grid, fancy_grid, pipe, # ascii, double, github, orgtbl, rst, mediawiki, html, latex, latex_booktabs, # textile, moinmoin, jira, vertical, tsv, csv. # Recommended: psql, fancy_grid and grid. table_format = psql # Syntax Style. Possible values: manni, igor, xcode, vim, autumn, vs, rrt, # native, perldoc, borland, tango, emacs, friendly, monokai, paraiso-dark, # colorful, murphy, bw, pastie, paraiso-light, trac, default, fruity syntax_style = default # Keybindings: # When Vi mode is enabled you can use modal editing features offered by Vi in the REPL. # When Vi mode is disabled emacs keybindings such as Ctrl-A for home and Ctrl-E # for end are available in the REPL. vi = False # Error handling # When one of multiple SQL statements causes an error, choose to either # continue executing the remaining statements, or stopping # Possible values "STOP" or "RESUME" on_error = STOP # Set threshold for row limit. Use 0 to disable limiting. row_limit = 1000 # Skip intro on startup and goodbye on exit less_chatty = False # Postgres prompt # \t - Current date and time # \u - Username # \h - Short hostname of the server (up to first '.') # \H - Hostname of the server # \d - Database name # \p - Database port # \i - Postgres PID # \# - "@" sign if logged in as superuser, '>' in other case # \n - Newline # \dsn_alias - name of dsn alias if -D option is used (empty otherwise) # \x1b[...m - insert ANSI escape sequence # eg: prompt = '\x1b[35m\u@\x1b[32m\h:\x1b[36m\d>' prompt = '\u@\h:\d> ' # Number of lines to reserve for the suggestion menu min_num_menu_lines = 4 # Character used to left pad multi-line queries to match the prompt size. multiline_continuation_char = '' # The string used in place of a null value. null_string = '