Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pg/pgwire] Bad type assumptions at parametrized queries. #6733

Closed
Tracked by #1731
MrLolthe1st opened this issue Jul 16, 2024 · 1 comment
Closed
Tracked by #1731

[pg/pgwire] Bad type assumptions at parametrized queries. #6733

MrLolthe1st opened this issue Jul 16, 2024 · 1 comment
Assignees
Labels

Comments

@MrLolthe1st
Copy link
Collaborator

Run DBeaver, open local -> schemes -> public -> tables
DBeaver sends Bind with one long: https://github.com/dbeaver/dbeaver/blob/530742d80358424b121392c7c09386dad7f09407/plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreSchema.java#L838
But at our side we're assuming that parameter to be unknown, that isn't true. Error follows: invalid byte sequence for encoding UTF8: 0x00.

SELECT c.oid,c.*,d.description,pg_catalog.pg_get_expr(c.relpartbound, c.oid) as partition_expr,  pg_catalog.pg_get_partkeydef(c.oid) as partition_key 
FROM pg_catalog.pg_class c
LEFT OUTER JOIN pg_catalog.pg_description d ON d.objoid=c.oid AND d.objsubid=0 AND d.classoid='pg_class'::regclass
WHERE c.relnamespace=$1 AND c.relkind not in ('i','I','c')
@shnikd
Copy link
Collaborator

shnikd commented Aug 1, 2024

We can't fix it now, the parameter type is required

@shnikd shnikd closed this as completed Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants