mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-25 06:20:42 +01:00
setup integration test for postgres
This commit is contained in:
1 parent
8b4914be55
commit
c9e093194d
18 files changed
+2175
-63
No files matched your search
@@ -136,8 +136,9 @@ func (e *SQLEngine) handleDescribeCommand(ctx context.Context, sql string) (*Que
|
||||
tableName = parts[1]
|
||||
}
|
||||
|
||||
// Remove backticks from table name if present (same as SQL parser does)
|
||||
// Remove backticks and semicolons from table name
|
||||
tableName = strings.Trim(tableName, "`")
|
||||
tableName = strings.TrimSuffix(tableName, ";")
|
||||
|
||||
database := ""
|
||||
|
||||
@@ -145,7 +146,9 @@ func (e *SQLEngine) handleDescribeCommand(ctx context.Context, sql string) (*Que
|
||||
if strings.Contains(tableName, ".") {
|
||||
dbTableParts := strings.SplitN(tableName, ".", 2)
|
||||
database = strings.Trim(dbTableParts[0], "`") // Also strip backticks from database name
|
||||
database = strings.TrimSuffix(database, ";")
|
||||
tableName = strings.Trim(dbTableParts[1], "`")
|
||||
tableName = strings.TrimSuffix(tableName, ";")
|
||||
}
|
||||
|
||||
return e.executeDescribeStatement(ctx, tableName, database)
|
||||
|
||||
@@ -105,7 +105,7 @@ func (e *SQLEngine) ExecuteSQL(ctx context.Context, sql string) (*QueryResult, e
|
||||
|
||||
// Handle DESCRIBE/DESC as a special case since it's not parsed as a standard statement
|
||||
if strings.HasPrefix(sqlUpper, "DESCRIBE") || strings.HasPrefix(sqlUpper, "DESC") {
|
||||
return e.handleDescribeCommand(ctx, sql)
|
||||
return e.handleDescribeCommand(ctx, sqlTrimmed)
|
||||
}
|
||||
|
||||
// Parse the SQL statement
|
||||
|
||||
Reference in new issue
Block a user