Skip to content

Commit d4e73b4

Browse files
austindrenskiroji
authored andcommitted
Include foreign tables in GetSchema(..) results
Fixes #2434
1 parent 6969fd9 commit d4e73b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Npgsql/NpgsqlSchema.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ static DataTable GetTables(NpgsqlConnection conn, string?[]? restrictions)
244244
getTables.Append(@"
245245
SELECT table_catalog, table_schema, table_name, table_type
246246
FROM information_schema.tables
247-
WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema')");
247+
WHERE table_type IN ('BASE TABLE', 'FOREIGN') AND table_schema NOT IN ('pg_catalog', 'information_schema')");
248248

249249
using (var command = BuildCommand(conn, getTables, restrictions, false, "table_catalog", "table_schema", "table_name", "table_type"))
250250
using (var adapter = new NpgsqlDataAdapter(command))

0 commit comments

Comments
 (0)