Skip to content

Cross-DB query using temp doesn't work #19

@danderson

Description

@danderson

Porting from modernc.org/sqlite to this package, one of my queries fail preparation, where it executed without issue on modernc:

sqlite.Prepare: SQLITE_ERROR: no such table: temp.seen (DELETE FROM dirty WHERE NOT EXISTS (SELECT 1 FROM temp.seen WHERE temp.seen.path = dirty.path))

Schema, for context:

CREATE TABLE IF NOT EXISTS dirty (
  id INTEGER PRIMARY KEY,
  path TEXT,
  mtime DATETIME,
  size INTEGER,
  dev INTEGER,
  inode INTEGER,
  canread INTEGER,

  dirty INTEGER
);

CREATE TEMPORARY TABLE temp.seen (path TEXT);

afaict, queries across regular and temporary tables should Just Work, but something about how this package sets things up makes it unable to query temporary tables in the same query as a non-temporary table (other queries that only touch the temporary table or non-temporary table work fine).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions