Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

supporting ECMAScript Temporal

未关闭
#3,663 7 条评论 18 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
冷清
技术栈
javascript, postgresql
领域
backend, databases

调研方向

先阅读 pg@9.0 的 breaking changes 讨论和里程碑,然后查看所引用的 Temporal 文档以及现有的 pg_types 方法。issue 没有指出任何实现文件或测试;要继续推进,需要确定映射,并就启用不向后兼容行为的机制达成一致。

由索引模型根据 Issue 内容生成。

描述

Word is that Temporal has reached Stage 4 and will be included in the next ECMAScript draft. I think it looks very promising and will allow for much better support for some PostgreSQL datatypes by mapping them to proper types instead of strings.
I took Temporal for a spin with the latest NodeJS nightly and ran some really basic happy path tests for the no-brainer datatype mappings:

  1. Temporal.Duration to PostgreSQL interval
  2. Temporal.PlainDate to PostgreSQL date
  3. Temporal.PlainTime to PostgreSQL time

Other mappings might not be so obvious and/or a matter of personal preference (e.g. I have no use for Temporal.ZonedDateTime and strongly prefer to get everything out of the database as Temporal.Instant). And obviously backward compatibility is its own can of worms.

Temporal support was also requested in the pg@9.0 breaking changes ideas discussion, but it has not been added to the pg@9.0 milestone. Is there a specific reason temporal not added to the milestone? Sorting out pg_types first?

Is there a template/guidance on how to propose changes that are not backward-compatible and can be enabled using a simple mechanism so it is possible to just add one option / env variable that switches all datetime parsing to Temporal datatypes instead?

主要语言
JavaScript
星标
13.2k
派生
1.4k
平均合并
6 天 15 小时
30 天内合并 PR
6

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

brianc/node-postgres 的其他 Issue

查看 brianc/node-postgres 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。