question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PostgreSQL cursors should allow all native column types

See original GitHub issue

Description

Currently, using SQLDelight with a pg instance omits some of the native column types. Those are:

  • uuid -> some multiplatform uuid library. maybe https://github.com/benasher44/uuid/
  • timestamp with timezone -> kotlinx.datetime.LocalDateTime
  • timestamp without timezone -> kotlinx.datetime.Instant
  • date -> kotlinx.datetime.LocalDate
  • time (with | without) time zone -> ??? not seeing a good kotlinx.datetime type for this
  • interval -> kotlinx.datetime.DateTimePeriod
  • blob/bytea -> ByteArray

We should extend the minimal SQLCursor to also include these types and call it PgSQLCursor.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
AlecStrongcommented, Feb 14, 2022

we have stately as a transitive dep of the native driver, I think its okay to have library requirements where it makes sense, especially because on the jvm its just java.uuid anyways

1reaction
hfhbdcommented, Mar 23, 2022

This feels short sighted to have this under the ktor umbrella. I’ve asked about promoting benasher/uuid to the kotlinx namespace in the kotlin lang slack here. Since this is something that has come up multiple times from both internal and external libraries, it might be worth re-raising in a more official way. Like Youtrack.

Rustam and I don’t mean under io.ktor, but as an official kotlinx lib.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation: 15: 43.7. Cursors - PostgreSQL
All access to cursors in PL/pgSQL goes through cursor variables, which are always of the special data type refcursor . One way to...
Read more >
PostgreSQL — SQLAlchemy 1.4 Documentation
Starting with version 9.5, PostgreSQL allows “upserts” (update or insert) of rows into a table via the ON CONFLICT clause of the INSERT...
Read more >
tlocke/pg8000: A Pure-Python PostgreSQL Driver - GitHub
pg8000. pg8000 is a pure-Python PostgreSQL driver that complies with DB-API 2.0. It is tested on Python versions 3.7+, on CPython and PyPy,...
Read more >
Data Types
These data types define the domain of values that each column can contain or each argument can have. For example, DATE columns cannot...
Read more >
Working with PostgreSQL Data Types in YugabyteDB | Yugabyte
In the world of databases, data types restrict what can be considered as valid values in a table's column. For example, if we...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found