feat: Add schema filtering for Postgres table col scanning
Modifies the query to ensure it correctly retrieves column names by including the schema check.
This commit is contained in:
parent
54b14d6753
commit
f479e27da6
1 changed files with 1 additions and 1 deletions
|
|
@ -106,7 +106,7 @@ namespace TShockAPI.DB
|
||||||
case SqlType.Postgres:
|
case SqlType.Postgres:
|
||||||
{
|
{
|
||||||
// HACK: Using "ilike" op to ignore case, due to weird case issues adapting for pgsql
|
// HACK: Using "ilike" op to ignore case, due to weird case issues adapting for pgsql
|
||||||
using QueryResult reader = database.QueryReader("SELECT column_name FROM information_schema.columns WHERE table_name ILIKE @0", table.Name);
|
using QueryResult reader = database.QueryReader("SELECT column_name FROM information_schema.columns WHERE table_schema=current_schema() AND table_name ILIKE @0", table.Name);
|
||||||
|
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue