Skip to content

pg_temp support in migrations #181

Closed
@maxhawkins

Description

@maxhawkins

One of my migrations uses a pg_temp table to migrate data from one table to another:

CREATE TABLE pg_temp.migrate (val INT);
INSERT INTO pg_temp.migrate (val) SELECT val FROM old;
INSERT INTO new (val) SELECT val FROM pg_temp.migrate;

When I run sqlc it says

schema.sql:2055:1: schema "pg_temp" does not exist

The pg_temp schema should implicitly exist when loading the schema.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions