Skip to content

Unhandled exception while executing query: 'list' object has no attribute 'encode' #281

Description

Describe the bug

When querying pgrowlocks() provided by the pgrowlocks extension, we get this error.

Example, in one session:

create table demo as select 1;
begin;
delete from demo;

Then in vscode:

create extension pgrowlocks;
select * from pgrowlocks('demo');

11:16:02 AM
Started executing query at Line 55
Unhandled exception while executing query: 'list' object has no attribute 'encode'
Total execution time: 00:00:00.108

When casting "xids" to text it works:

select locked_row, locker, multi,  xids::text[], modes, pids from pgrowlocks('demo');

To Reproduce

No need to install the extension to test it:

drop function if exists myfunction();
create or replace function myfunction()
returns table (
    xids xid[]
)
language sql
as $$
select
    array['123'::xid]
$$;

select xids from myfunction();

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions