Skip to main content
An alias and a dot give you that table’s columns, and that holds for a subquery or a WITH table that exists only in the statement you are writing. Everything the popup offers is decided by where the cursor sits. It opens itself after FROM, JOIN, ON and the other clauses with a short answer, and stays shut where a full list would be noise, such as after a comma in a SELECT list. Ctrl+Space overrides both.
Autocomplete

Context-aware autocomplete

There is no setting for autocomplete and nothing to turn off. What the popup offers depends entirely on where the cursor sits.

SQL keywords

Table names

Tables appear after FROM, JOIN, INSERT INTO and similar keywords, and lead the list ahead of keywords there. The clause is read at the cursor, so a second or third JOIN still offers tables.

Column names

A FROM clause anywhere in the statement, even after the cursor, decides which tables columns come from. With no FROM clause yet every cached table contributes, and ambiguous names are qualified: users.id, orders.id.

Aliases, subqueries and CTEs

An alias followed by . gives that table’s columns. A derived table or a WITH table gives the columns its own SELECT list produces:
AS name, bare names and qualified t.col all resolve. A SELECT * subquery and an unaliased AVG(score) have no name to offer, so they are skipped.

Functions and operators

Functions appear in SELECT, WHERE and expression contexts, the connection’s own dialect alongside the common SQL ones: CONVERT_TIMEZONE on Snowflake, SAFE_CAST on BigQuery.
Operators the dialect declares appear in WHERE, ON, HAVING and AND, each with what it does and the types it takes. On PostgreSQL that covers JSON, array and range containment, regex, full-text search and the network operators:
An operator restricted to jsonb is held back on a json column rather than offered and rejected by the server.

Casts and enum values

Typing :: offers the dialect’s type names in the spelling you write, not the internal catalog name. Comparing against a column whose type declares a fixed set of values, a PostgreSQL enum for instance, offers those values quoted:

Schema names

On multi-schema engines, schemas complete in FROM and public.users resolves in FROM, JOIN, UPDATE, INSERT INTO and CREATE INDEX. Where the hierarchy is database, schema, table (Snowflake, BigQuery), every segment completes and a schema you have not opened in the sidebar is fetched on demand:

Favorite keywords

A favorite with a keyword, stored in the database or set by @keyword frontmatter in a linked file, appears as a top-priority match. Type the keyword, accept it, and the favorite’s full SQL replaces it inline. A ;; in that SQL says where the cursor lands afterwards. See Favorites.

MongoDB

MongoDB connections complete MQL, so the popup follows the shape of the query rather than SQL clauses:
$set and $unset mean different things as an update operator and as a pipeline stage; the description shown is whichever applies at the cursor. Field names come from a sample of the collection’s documents, nested paths included, so address: { city, zip } offers address, address.city and address.zip. Objects inside an array contribute paths too, and shallower fields sort first. The sample is cached per collection and cleared when you switch database or refresh the connection. Comments suppress completion, and a brace or bracket inside a string literal does not open a document.

My new table does not complete

Table and column names are cached at connect, so a migration or a CREATE TABLE run from a terminal stays invisible until the cache reloads. Press Cmd+R (Database > Refresh), or right-click the sidebar’s Tables header and choose Refresh. Switching databases reloads it too.

Large files

Completion works on files of any size, multi-megabyte dumps included. Past 500 KB only a 10 KB window around the cursor is read, so suggestions follow the statements near you rather than the whole file.