GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Incompatible type when opening Query Tool in server mode · Issue #6252 · pgadmin-org/pgadmin4

Incompatible type when opening Query Tool in server mode #6252

New issue
Copy link
New issue
Copy link
Closed
Closed
Incompatible type when opening Query Tool in server mode#6252
Copy link
Assignees
FaharAbbasRizvi
Labels
Bug
Milestone
7.6

Description

@countessellis
countessellis
opened on May 5, 2023
Issue body actions

Describe the bug

When opening the Query tool from the console, I get the following error:

(psycopg.errors.UndefinedFunction) operator does not exist: integer = character varying\nLINE 3: ..._id = $2::INTEGER AND sharedserver.servergroup_id = $3::VARC...\n

Looking at the rest of the message, in the parameters to the sharedserver query, servergroup_id_1 is being provided as a string, not an integer:

'servergroup_id_1': '6'

In the table, the field that is matching is an integer.

I see this behaviour in both 7.0 and 7.1.

To Reproduce

Steps to reproduce the behavior:

  1. Deploy PGAdmin4 docker image, in server mode, with a postgres backend database (likely same error running in server mode in a non-docker deploy).
  2. Connect to a server, then right click on the database you want to query against.
  3. Right click and choose Query Tool.

Expected behavior

The Query Tool opens.

Error message

{"success":0,"errormsg":"(psycopg.errors.UndefinedFunction) operator does not exist: integer = character varying\nLINE 3: ..._id = $2::INTEGER AND sharedserver.servergroup_id = $3::VARC...\n ^\nHINT: No operator matches the given name and argument types. You might need to add explicit type casts.\n[SQL: SELECT sharedserver.id AS sharedserver_id, sharedserver.osid AS sharedserver_osid, sharedserver.user_id AS sharedserver_user_id, sharedserver.server_owner AS sharedserver_server_owner, sharedserver.servergroup_id AS sharedserver_servergroup_id, sharedserver.name AS sharedserver_name, sharedserver.host AS sharedserver_host, sharedserver.port AS sharedserver_port, sharedserver.maintenance_db AS sharedserver_maintenance_db, sharedserver.username AS sharedserver_username, sharedserver.password AS sharedserver_password, sharedserver.save_password AS sharedserver_save_password, sharedserver.role AS sharedserver_role, sharedserver.comment AS sharedserver_comment, sharedserver.discovery_id AS sharedserver_discovery_id, sharedserver.db_res AS sharedserver_db_res, sharedserver.bgcolor AS sharedserver_bgcolor, sharedserver.fgcolor AS sharedserver_fgcolor, sharedserver.service AS sharedserver_service, sharedserver.use_ssh_tunnel AS sharedserver_use_ssh_tunnel, sharedserver.tunnel_host AS sharedserver_tunnel_host, sharedserver.tunnel_port AS sharedserver_tunnel_port, sharedserver.tunnel_username AS sharedserver_tunnel_username, sharedserver.tunnel_authentication AS sharedserver_tunnel_authentication, sharedserver.tunnel_identity_file AS sharedserver_tunnel_identity_file, sharedserver.tunnel_password AS sharedserver_tunnel_password, sharedserver.shared AS sharedserver_shared, sharedserver.connection_params AS sharedserver_connection_params, servergroup_1.id AS servergroup_1_id, servergroup_1.user_id AS servergroup_1_user_id, servergroup_1.name AS servergroup_1_name \nFROM sharedserver LEFT OUTER JOIN servergroup AS servergroup_1 ON servergroup_1.id = sharedserver.servergroup_id \nWHERE sharedserver.name = %(name_1)s::VARCHAR(128) AND sharedserver.user_id = %(user_id_1)s::INTEGER AND sharedserver.servergroup_id = %(servergroup_id_1)s::VARCHAR AND sharedserver.osid = %(osid_1)s::INTEGER \n LIMIT %(param_1)s::INTEGER]\n[parameters: {'name_1': 'common', 'user_id_1': 2, 'servergroup_id_1': '6', 'osid_1': 33, 'param_1': 1}]\n(Background on this error at: https://sqlalche.me/e/20/f405)","info":"","result":null,"data":null}

Desktop (please complete the following information):

  • OS: Any client, but using Windows 10, server running in with pgage/pgadmin4 docker image
  • Version: 7.0 and 7.1
  • Mode:Server
  • Browser Firefox and Chrome
  • Package type: Container
Reacted by Daniel Souza, Jerry O'Donovan, Dagon- and Deepak G.C

Activity

  1. countessellis
    added
    Bug
    on May 5, 2023
  2. akshay-joshi
    added this to Not Refinedon May 8, 2023
  3. yogeshmahajan-1903
    added
    EDB Sprint 143
    on May 19, 2023
  4. yogeshmahajan-1903
    added this to Ready for Sprint Bugs and removed this from Not Refinedon May 19, 2023
  5. akshay-joshi
    removed
    EDB Sprint 143
    on May 24, 2023
  6. jodonovan-kv commented on Jun 6, 2023

    @jodonovan-kv
    jodonovan-kv
    on Jun 6, 2023
    More actions

    Seeing the same issue after upgrading from 6.19 to 7.2 in server mode. This is now preventing us from using shared servers.
    The user who added the server can access it normally.

    In our case if a user tries to open either the Query tool or View Data on a shared server they will get:

    {
        "success": 0,
        "errormsg": "(psycopg.errors.UndefinedFunction) operator does not exist: integer = character varying
            LINE 3: ..._id = $2::INTEGER AND sharedserver.servergroup_id = $3::VARC...
                                                                 ^
            HINT:  No operator matches the given name and argument types. You might need to add explicit type casts.
            [SQL: SELECT sharedserver.id AS sharedserver_id, sharedserver.osid AS sharedserver_osid, sharedserver.user_id AS sharedserver_user_id, sharedserver.server_owner AS sharedserver_server_owner, sharedserver.servergroup_id AS sharedserver_servergroup_id, sharedserver.name AS sharedserver_name, sharedserver.host AS sharedserver_host, sharedserver.port AS sharedserver_port, sharedserver.maintenance_db AS sharedserver_maintenance_db, sharedserver.username AS sharedserver_username, sharedserver.password AS sharedserver_password, sharedserver.save_password AS sharedserver_save_password, sharedserver.role AS sharedserver_role, sharedserver.comment AS sharedserver_comment, sharedserver.discovery_id AS sharedserver_discovery_id, sharedserver.db_res AS sharedserver_db_res, sharedserver.bgcolor AS sharedserver_bgcolor, sharedserver.fgcolor AS sharedserver_fgcolor, sharedserver.service AS sharedserver_service, sharedserver.use_ssh_tunnel AS sharedserver_use_ssh_tunnel, sharedserver.tunnel_host AS sharedserver_tunnel_host, sharedserver.tunnel_port AS sharedserver_tunnel_port, sharedserver.tunnel_username AS sharedserver_tunnel_username, sharedserver.tunnel_authentication AS sharedserver_tunnel_authentication, sharedserver.tunnel_identity_file AS sharedserver_tunnel_identity_file, sharedserver.tunnel_password AS sharedserver_tunnel_password, sharedserver.shared AS sharedserver_shared, sharedserver.connection_params AS sharedserver_connection_params, servergroup_1.id AS servergroup_1_id, servergroup_1.user_id AS servergroup_1_user_id, servergroup_1.name AS servergroup_1_name 
            FROM sharedserver LEFT OUTER JOIN servergroup AS servergroup_1 ON servergroup_1.id = sharedserver.servergroup_id 
            WHERE sharedserver.name = %(name_1)s::VARCHAR AND sharedserver.user_id = %(user_id_1)s::INTEGER AND sharedserver.servergroup_id = %(servergroup_id_1)s::VARCHAR AND sharedserver.osid = %(osid_1)s::INTEGER 
            LIMIT %(param_1)s::INTEGER]
            [parameters: {"name_1": "DS - postgres", "user_id_1": 5, "servergroup_id_1": "3", "osid_1": 11, "param_1": 1}]
            (Background on this error at: https://sqlalche.me/e/20/f405)",
        "info": "",
        "result": null,
        "data": null
    }
    
  7. Dagon- commented on Jul 27, 2023

    @Dagon-
    Dagon-
    on Jul 27, 2023
    More actions

    Upgraded to 7.5 from 6.x. I'm now seeing this with shared DB's. Same errors as those already reported.

    Reacted by ssaslavsky
  8. ssaslavsky commented on Aug 1, 2023

    @ssaslavsky
    ssaslavsky
    on Aug 1, 2023
    More actions

    I just deployed 7.5 from docker, and I can see this issue too
    whith this bug, Shared servers functionality is useless for us

  9. akshay-joshi
    added this to Current Sprint (213) and removed this from Ready for Sprint Bugson Aug 2, 2023
  10. akshay-joshi
    moved this to 🆕 New in Current Sprint (213)on Aug 2, 2023
  11. akshay-joshi
    added
    EDB Sprint 148
    on Aug 2, 2023
  12. adityatoshniwal
    self-assigned this
    on Aug 3, 2023
  13. adityatoshniwal
    moved this from 🆕 New to 🏗 In Progress in Current Sprint (213)on Aug 3, 2023
  14. adityatoshniwal
    added a commit that references this issue on Aug 3, 2023

    Fix an issue where query tool on shared server is throwing error if t…

    59c4a00
  15. adityatoshniwal
    added this to the 7.6 milestone on Aug 3, 2023
  16. adityatoshniwal
    moved this from 🏗 In Progress to In Testing in Current Sprint (213)on Aug 3, 2023
  17. adityatoshniwal
    removed their assignment
    on Aug 3, 2023
  18. akshay-joshi
    added a commit that references this issue on Aug 4, 2023

    Fix an issue where query tool on shared server is throwing error if t…

    01ba49d
  19. akshay-joshi
    assigned
    FaharAbbasRizvi
    on Aug 11, 2023
  20. akshay-joshi
    added
    EDB Sprint 149
    and removed
    EDB Sprint 148
    on Aug 16, 2023
  21. FaharAbbasRizvi commented on Aug 17, 2023

    @FaharAbbasRizvi
    FaharAbbasRizvi
    on Aug 17, 2023
    Contributor
    More actions

    This is resolved in the last snapshot build for Docker.

  22. FaharAbbasRizvi
    closed this as completedon Aug 17, 2023
  23. FaharAbbasRizvi
    moved this from In Testing to ✅ Done in Current Sprint (213)on Aug 17, 2023
  24. akshay-joshi
    removed this from Current Sprint (213)on Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @FaharAbbasRizvi
    FaharAbbasRizvi

Labels

Bug

Type

No type

Projects

No projects

    Milestone

    • 7.6

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.