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

Handle postgres datatype xid? query returns Error: unknown data type with typelem: 28 #64

Closed
jameshowison opened this issue Mar 13, 2022 · 3 comments
Labels

Comments

@jameshowison
Copy link

While creating a sample query I tried to list databases using a SELECT query, running into:

Error: unknown data type with typelem: 28 for colNum: 10 with name: datfrozenxid while executing "SELECT *
FROM pg_database;".

running

SELECT *
FROM pg_database

In terminal that table has this description; it seems the xid column type is the issue?

# \d pg_database
               Table "pg_catalog.pg_database"
    Column     |   Type    | Collation | Nullable | Default 
---------------+-----------+-----------+----------+---------
 datname       | name      |           | not null | 
 datdba        | oid       |           | not null | 
 encoding      | integer   |           | not null | 
 datcollate    | name      |           | not null | 
 datctype      | name      |           | not null | 
 datistemplate | boolean   |           | not null | 
 datallowconn  | boolean   |           | not null | 
 datconnlimit  | integer   |           | not null | 
 datlastsysoid | oid       |           | not null | 
 datfrozenxid  | xid       |           | not null | 
 datminmxid    | xid       |           | not null | 
 dattablespace | oid       |           | not null | 
 datacl        | aclitem[] |           |          | 
Indexes:
    "pg_database_datname_index" UNIQUE, btree (datname), tablespace "pg_global"
    "pg_database_oid_index" UNIQUE, btree (oid), tablespace "pg_global"
Tablespace: "pg_global"
@marimeireles
Copy link
Member

Hey @jameshowison thank for opening the issue!
Indeed we don't support xid. The reason for that is because the upstream library that we use to run xeus-sql doesn't support it.
You can open an issue upstream and ask for them to include it.
Or someone that's interested could include it themselves. Supposing the implementation of xid is similar to the oid It doesn't seem super complicated... But I really have no knowledge about SQL internals and it could actually be a beast?
I'd recommend opening an issue upstream to learn more about it, and if you can link it here, would be great! :)

@marimeireles
Copy link
Member

Ah, btw the upstream lib is: https://github.com/SOCI/soci

@marimeireles
Copy link
Member

Closing this one as upstream.

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

2 participants