Skip to content

42P01: relation does not exist when using temp table #802

@vadimi

Description

@vadimi

Hi,
The following code throws 42P01: relation "r1" does not exist exception:

using (var conn = new Npgsql.NpgsqlConnection("Server=localhost;Database=db1;Username=user;Password=password;"))
{
    var q = @"
        create temp table r1(datasource_id integer);
        select * from r1;";

    conn.Open();

    using (var cmd = new NpgsqlCommand())
    {
        cmd.Connection = conn;
        cmd.CommandText = q;
        using (var reader = cmd.ExecuteReader())
        {
        }
    }
}

It was working fine with 2.2.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions