Unhandled exception while executing query: 'list' object has no attribute 'encode'
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- postgresql
- Domain
- databases
Research direction
Start by running the SQL reproduction in the issue, including the pgrowlocks query and the myfunction() query returning xid[]. Trace how the extension handles the returned array value and add or update a regression test for this case; done means selecting the xid[] result no longer raises the encode exception.
Written by the indexing model from the issue text.
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();
- Dominant language
- No language data
- Stars
- 395
- Forks
- 33
- Avg merge
- 1h 46m
- Merged PRs (30d)
- 3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode-pgsql
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/vscode-pgsql#190 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/vscode-pgsql#307 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
microsoft/vscode-pgsql#306 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
microsoft/vscode-pgsql#305 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
microsoft/vscode-pgsql#302 ·
All issues in microsoft/vscode-pgsql
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Business User Story
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
[Documentation Request] vLLM kv_load_failure_policy doesn't apply to load failures in L2 adapters Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100