Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

supporting ECMAScript Temporal

Đang mở
#3,663 7 bình luận 18 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
javascript, postgresql
Lĩnh vực
backend, databases

Hướng nghiên cứu

Bắt đầu bằng cách đọc thảo luận và milestone về các breaking changes của pg@9.0, sau đó xem lại tài liệu Temporal được tham chiếu và cách tiếp cận pg_types hiện có. issue không nêu tên tệp triển khai hay test nào; để tiến triển, cần quyết định mapping và thống nhất một cơ chế để bật hành vi không tương thích ngược.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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?

Ngôn ngữ chính
JavaScript
Star
13.2k
Fork
1.4k
Merge trung bình
6 ngày 15 giờ
Pull request đã merge (30 ngày)
6

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của brianc/node-postgres

Tất cả issue của brianc/node-postgres

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.