this post was submitted on 09 Aug 2023
16 points (90.0% liked)

Sysadmin

5584 readers
1 users here now

A community dedicated to the profession of IT Systems Administration

founded 5 years ago
MODERATORS
 

As a sysadmin mostly used to the nice and powerful way Postgres manages dates, every time i’ve had to do stuff on SQLite i find myself missing that. Feels like they offloaded that into whatever code connects to the database instead of handling it at DB level.

Is there a way to give SQLite the powerful and reliable date management Postgres has, or at least something similar? Hopefully something as devoid of dependency hell as SQLite itself is

top 3 comments
sorted by: hot top controversial new old
[–] bahmanm@lemmy.ml 7 points 1 year ago

Nowhere as convenient as using psql but you could try using Python or Perl to have a more civilised interaction w/ SQLite. For Python the module sqlite3 is already in the stdlib and for Perl just install perl-DBD-sqlite using your package manager.

[–] spicenozzle@lemm.ee 4 points 1 year ago (1 children)

Is there something specific you need in SQLite?

[–] jherazob@kbin.social 3 points 1 year ago

Nothing specific, but Postgres date management is really, really useful, i can do a query on a date, parts of a date, timestamps, compare dates and times, intervals, all sorts of powerful operations. SQLite seems to have none of that, the date seems like a courtesy item added later as an afterthought because somebody asked or something, it has absolutely none of that, and when i have to do things with it it's painful, relying on doing operations on the Unix epoch of dates for most stuff because the dates themselves are not really usable. Was hoping somebody else had done something to improve on this but doesn't look like it.