-
Notifications
You must be signed in to change notification settings - Fork 167
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
Add duration type when rust support it #26
Comments
Hi! I noticed last day that the from __future__ import annotations
import os
import connectorx as cx
from dotenv import load_dotenv
load_dotenv()
user: str | None = os.getenv("POSTGRESQL_USER")
password: str | None = os.getenv("POSTGRESQL_PASSWORD")
host: str | None = os.getenv("POSTGRESQL_HOST")
port: str | None = os.getenv("POSTGRESQL_PORT")
database: str | None = os.getenv("POSTGRESQL_DATABASE")
connection_uri = f"postgres://{user}:{password}@{host}:{port}/{database}"
# get top 10 values from `durata_noleggio` col which is an `interval` type
cx.read_sql(connection_uri, "SELECT durata_noleggio FROM bikemi_data LIMIT 10")
|
Hi @baggiponte , yes we do not support interval for postgres. The supported types can be found here: https://sfu-db.github.io/connector-x/databases/postgres.html The reason is that the underlying client driver we use doesn't support interval since there is no corresponding rust type developed: sfackler/rust-postgres#60. We will keep this on track. |
Oh this is interesting - how does rust handle time durations? At this point, I guess it simply doesn't (Btw I thought the issue was solved because I saw the PR merged. Thank you for the nice reply!) |
Yes, I think it doesn't support durations now.
Which PR do you mean? I think the issue is still open: sfackler/rust-postgres#60? |
i16, f32/i32, interval, numeric, enum, bytes, char, time, timetz, uuid,
and add test
The text was updated successfully, but these errors were encountered: