Help › Write SQL

Read the editor's underlines

What the wavy underlines in the SQL editor mean, where to read the message, and why some problems are not marked.

Querlyn 0.1.0 is not released yet. This help describes it ahead of release.

While you write, Querlyn checks the SQL in the background and underlines what looks wrong. Nothing is sent to the database for this: the checks use the table and column names Querlyn has already read.

Read a message

A wavy underline marks the place. To read what it is about:

  • Point at the underlined text. A small box shows the message.
  • Or put the cursor in it. The status bar shows the message at the cursor.

The color tells how serious it is:

UnderlineMeaning
RedAn error: the statement cannot run as written.
AmberA warning: probably a mistake, or something to know before you run it.
BlueA note: worth knowing.
MutedA hint.

An underline never stops you from running the statement. The database has the last word.

What is checked

MessageWhen
A string, a quoted name, a comment or a dollar-quoted text is never closedAlways. Marked as an error from where it opens to the end of that line.
"Unknown table …", "Unknown schema …"The statement names a table or schema the database does not have.
"Unknown column …", often with "Did you mean …?"None of the statement's tables has that column.
"Column … is ambiguous"More than one of the statement's tables has the column, and it is written without a table. The message suggests how to qualify it.
"Unknown table or alias …"A name before a dot is not a table or alias of the statement.
"Table name … is used more than once in this FROM clause"Two tables of one FROM go by the same name; give one an alias.
A lock warningOn PostgreSQL, MySQL and MariaDB: a schema change that would make other sessions wait. See Migration lock warnings.

The checks that compare names with the database are warnings, not errors.

Why something is not marked

Querlyn marks a name only when it is sure. It stays quiet:

  • in a tab with No connection, or before the names of the tables involved have been read;
  • for a statement it could not read completely, for example one you are still typing;
  • for a table created earlier in the same tab;
  • in a tab whose text is larger than 4 MB.

So no underline does not mean the statement is right. Run it, or use Explain, to have the database check it.

When a mark is wrong

If a table exists but Querlyn says it is unknown, its list of names is out of date: select the connection or the schema in the sidebar and choose Query › Refresh.

Help for Querlyn 0.1.0. All help topics