title: In .NET 5 why am I unable to access PostgreSQL tables in a custom schema?
body: <p>We have a custom schema (<code>config</code>) in our DB where we have multiple tables declared and populated. In DataGrip and pgAdmin alike we're able to see the tables in the custom schema. The following query shows us tables in both the <code>public</code> schema as well as in the <code>custom</code> schema:</p>
  <pre><code>select table_schema, table_name 
  from information_schema.tables
  where not table_schema='pg_catalog' 
    and not table_schema='information_schema';
  </code></pre>
  <p>In DataGrip we had to &quot;show all schemas&quot;; in pgAdmin, everything was visible right away, tables from both schemas.</p>
  <p>However, in .NET code, when we run the same query, we only see the <code>public</code> tables.</p>
  <pre><code>await using var conn = new NpgsqlConnection(connString);
  await conn.OpenAsync();
  await using var cmd = new NpgsqlCommand(
      @&quot;select table_schema, table_name 
              from information_schema.tables
              where not table_schema = 'pg_catalog' 
                and not table_schema = 'information_schema';&quot;, conn);
  
  await using var reader = await cmd.ExecuteReaderAsync();
  while (await reader.ReadAsync())
      Console.WriteLine(reader.GetString(0) + &quot;.&quot; + reader.GetString(1));
  </code></pre>
  <p>The connection string does include: <code>;SearchPath=config,public</code></p>
  <p>All we're getting back from that code is tables in <code>public</code>.</p>