Skip to content

current_setting('server_version_num') errors #1366

Closed

Description

@tbantle22

I'm trying to use doltgres with PrismaJS and their built-in schema migration uses the current_setting function, which currently panics in doltgres.

This is the full query:

{"Type":"Parse","Name":"s1","Query":"SELECT EXISTS(SELECT 1 FROM pg_namespace WHERE nspname = $1), version(), current_setting('server_version_num')::integer as numeric_version;","ParameterOIDs":null}

But these fail with the same error:

postgres=> SELECT current_setting('server_version_num')::integer as numeric_version;
ERROR:  DoltgresHandler caught panic: interface conversion: interface {} is int64, not string (errno 1105) (sqlstate HY000)

postgres=> SELECT current_setting('server_version_num');
ERROR:  DoltgresHandler caught panic: interface conversion: interface {} is int64, not string (errno 1105) (sqlstate HY000)

postgres=> SELECT current_setting('server_version_num')::integer;
ERROR:  DoltgresHandler caught panic: interface conversion: interface {} is int64, not string (errno 1105) (sqlstate HY000)

Skipped test: https://github.com/dolthub/doltgresql/pull/1373/files#diff-473e3368821f3fde50365510a3db34b2039a618da8a34b1b492699c50e5b8881R5442

Activity

  1. added
    enhancement
    on Apr 8, 2025
  2. self-assigned this
    on Apr 9, 2025
  3. changed the title [-]Implement `current_setting` function[/-] [+]`current_setting('server_version_num')` errors[/+] on Apr 9, 2025
  4. added
    bug
    and removed
    enhancement
    on Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions