#mysql
3 discoveries · Hand-picked discoveries from the open web, newest first.
-
Show HN: SW Connector 2.0.5 MySQL and PostgreSQL Support for Schema Weaver
Comments URL: https://news.ycombinator.com/item?id=50588203 Points: 2 # Comments: 1
Show HN · EN
-
PostgreSQL 19 Released
PostgreSQL 19 Released Most years PostgreSQL ships a new release in September, but this year's release came two months later thanks mainly to the flurry of issues that the PostgreSQL team needed to address as part of the ongoing AI-reported vulnerability apocalypse. This release was definitely worth the wait. My favorite new feature is this one: For applications that send reads to standbys, PostgreSQL 19 adds "read-your-writes" consistency with the new WAIT FOR LSN command. A session on a standby can use WAIT FOR LSN to wait until the standby has replayed the write-ahead log (WAL) up to a spec
Simon Willison · EN
-
MySQL 和 PostgreSQL 中的时间戳:Go 和 Java 访问时的坑
同样叫 timestamp,MySQL 和 PostgreSQL 的含义完全不同:一个是绝对时刻,一个是墙钟时间,正好相反。踩坑重灾区,也是面试高频题。这篇文章把两者放在一起对齐比较,并且提供了 Go 语言和 Java 语言应用访问数据库时间类型字段的坑。 前四节讲数据库侧(类型语义与对照),后四节讲应用侧(时间从应用流到列的链路、Go 与 Java 驱动的行为、可直接抄的配置清单)。 一、先分清两种语义 一切混乱的根源是"时间"这个词同时指两样东西: 绝对时刻(instant) :世界上唯一的一个瞬间,比如 2026-09-05 00:00:00 UTC 。下单、日志、消息发送用它。任何时区看到的都是同一个点,只是显示不同。 墙钟时间(wall time) :挂钟上的读数,比如"早上 9 点开会"。不带时区就没有唯一时刻,但业务要的就是这个字面值:每天 9:00 的闹钟、营业时间、生日、定时任务。 四种数据库类型各占一边: 绝对时刻 墙钟时间 MySQL TIMESTAMP DATETIME PostgreSQL timestamptz timestamp 名字陷阱就在这张表里:MySQL 的 TIMESTAMP 对应 PG 的 timestamptz ,不是 PG 的 timestamp 。跨库迁移或写 ORM 时极易搞反。后面所有内容都是这张表的展开。
鸟窝 · ZH