oguimbal / pg-mem

An in memory postgres DB instance for your unit tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error with transaction: SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY;;

GGAlanSmithee opened this issue Β· comments

Describe the bug

When attempting to run a query in a transaction,

QueryError: πŸ’” Your query failed to parse.
This is most likely due to a SQL syntax error. However, you might also have hit a bug, or an unimplemented feature of pg-mem.
If this is the case, please file an issue at https://github.com/oguimbal/pg-mem along with a query that reproduces this syntax error.

πŸ‘‰ Failed query:

    SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY;;

πŸ’€ Syntax error at line 1 col 29:

1  SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY;;
                               ^
Unexpected kw_as token: "as". Instead, I was expecting to see one of the following:

    - A "op_eq" token
    - A "kw_to" token

To Reproduce

SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY;;

pg-mem version

"version": "2.8.1"