Failing ANSI SQL
CREATE TABLE siths(
name TEXT
);
CREATE TABLE jedi(
name TEXT
);
INSERT INTO siths (name)
SELECT jedi.name
FROM jedi
LEFT JOIN siths ON jedi.name = siths.name -- Multiple columns found with name name
WHERE siths.name IS NULL;
Description
To resolve the column name in the column list here (name), it using the same function queryAvailable(). This behavior is not expected with a INSERT ... SELECT, the select query has no access to the table unless it is explicitly joined.
Unfortunately, you need this behavior when using ON CONFLICT SET UPDATE, in this case the table is exposed as old/new.
There is a workaround through: INSERT INTO siths AS notAvailable (name)
Failing ANSI SQL
Description
To resolve the column name in the column list here
(name), it using the same functionqueryAvailable(). This behavior is not expected with aINSERT ... SELECT, the select query has no access to the table unless it is explicitly joined.Unfortunately, you need this behavior when using
ON CONFLICT SET UPDATE, in this case the table is exposed asold/new.There is a workaround through:
INSERT INTO siths AS notAvailable (name)