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

BUG: PostgreSQL interval type not recognized #1661

Closed
dsaxton opened this issue Oct 20, 2018 · 1 comment · Fixed by #1754
Closed

BUG: PostgreSQL interval type not recognized #1661

dsaxton opened this issue Oct 20, 2018 · 1 comment · Fixed by #1754
Assignees
Labels
feature Features or general enhancements postgres The PostgreSQL backend
Milestone

Comments

@dsaxton
Copy link

dsaxton commented Oct 20, 2018

I believe this would actually be an issue with sqlalchemy, but I noticed that a warning is issued when one tries to reference a Postgres table with a column of interval data type (the warning says that the type isn't recognized).

Here is the DDL for such a table from the Postgres documentation (https://www.postgresql.org/docs/9.1/static/sql-createtable.html):

create table films (
    code        char(5) constraint firstkey primary key,
    title       varchar(40) not null,
    did         integer not null,
    date_prod   date,
    kind        varchar(10),
    len         interval hour to minute
);

If we then try to refer to this table using ibis (after creating it in the public schema of a local database called postgres) we see that the len column has an unrecognized type and we end up with a null data type:

import ibis

conn = ibis.postgres.connect(database="postgres")
conn.table("films")
@cpcloud cpcloud added this to the Future milestone Oct 20, 2018
@cpcloud cpcloud self-assigned this Oct 20, 2018
@cpcloud cpcloud added feature Features or general enhancements postgres The PostgreSQL backend labels Oct 20, 2018
@cpcloud cpcloud modified the milestones: Future, Next Release Oct 20, 2018
@cpcloud
Copy link
Member

cpcloud commented Oct 20, 2018

I just prototyped support for this and I think we can get this in for the next release.

@cpcloud cpcloud modified the milestones: 1.0.0, Next Bugfix Release Mar 25, 2019
@cpcloud cpcloud changed the title BUG: Possible issue with Postgres interval data type BUG: PostgreSQL interval type not recognized Apr 4, 2019
cpcloud added a commit that referenced this issue Apr 4, 2019
Closes #1661
Author: Phillip Cloud <cpcloud@gmail.com>

Closes #1754 from cpcloud/gh-1661 and squashes the following commits:

a16d51a [Phillip Cloud] BUG: PostgreSQL interval type not recognized
@cpcloud cpcloud modified the milestones: Next Bugfix Release, Next Feature Release Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Features or general enhancements postgres The PostgreSQL backend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants