Skip to content

[PostgreSQL] Syntax error in RegionManager due to backticks in SQL queries #3288

@NEKECKS

Description

@NEKECKS
  • TShock version: 6.1.0 for 1.4.5.6
  • TShock build number (nah, i don't, like i just downloaded from Release):

Reproduction steps (if applicable)?

  1. Open /tshock/config.json
  2. Change "StorageType": "sqlite", to "StorageType": "postgres", and save.
  3. Run the server using DOTNET_gcServer=1 taskset -c 7-11 ./TShock.Server. (I using that cause i have 2 cpu and i want run the server just on one of them.)
  4. use /region function like define delete list and other...

Any stack traces or error messages (if known)?

2026-05-05 01:00:28 - Utils: INFO: NekeckS выполнил: /region define test.
2026-05-05 01:00:28 - RegionManager: ERROR: Npgsql.PostgresException (0x80004005): 42601: ошибка синтаксиса (примерное положение: "`")

POSITION: 86
   at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage) in Npgsql.dll:token 0x6000bd0+0x41b
   at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token) in System.Private.CoreLib.dll:token 0x6007581+0x0
   at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken) in Npgsql.dll:token 0x600044a+0x445
   at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken) in Npgsql.dll:token 0x600044a+0xf6f
   at Npgsql.NpgsqlDataReader.NextResult() in Npgsql.dll:token 0x6000448+0x38
   at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken) in Npgsql.dll:token 0x60002ab+0x57e
   at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken) in Npgsql.dll:token 0x60002ab+0x97b
   at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken) in Npgsql.dll:token 0x60002a1+0x92
   at Npgsql.NpgsqlCommand.ExecuteNonQuery() in Npgsql.dll:token 0x600029f+0x12
   at TShockAPI.DB.DbExt.Query(IDbConnection olddb, String query, Object[] args) in /home/runner/work/TShock/TShock/TShockAPI/Extensions/DbExt.cs:line 56
   at TShockAPI.DB.RegionManager.AddRegion(Int32 tx, Int32 ty, Int32 width, Int32 height, String regionname, String owner, String worldid, Int32 z) in /home/runner/work/TShock/TShock/TShockAPI/DB/RegionManager.cs:line 138
  Exception data:
    Severity: ОШИБКА
    SqlState: 42601
    MessageText: ошибка синтаксиса (примерное положение: "`")
    Position: 86
    File: scan.l
    Line: 1236
    Routine: scanner_yyerror

Any screenshots?

Image Image Image I try to add a dummy region to understand the trouble, useles information.

Any log messages from files that end in .log or .txt? What are the last 100 log messages from the server console?

2026-05-05_00-59-14.log

What plugins and what versions of those plugins are you running?

If I didn't provide any logs this issue, please close my issue immediately. I'm sorry for the inconvenience.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions