Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

supporting ECMAScript Temporal

Aperta
#3,663 7 commenti 18 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
javascript, postgresql
Ambito
backend, databases

Direzione di ricerca

Inizia leggendo la discussione e la milestone sui breaking changes di pg@9.0, quindi esamina la documentazione di Temporal indicata e l’approccio esistente di pg_types. L’issue non indica file di implementazione né test; per procedere sarebbe necessario decidere un mapping e concordare un meccanismo per abilitare il comportamento incompatibile con le versioni precedenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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?

Lingua principale
JavaScript
Stelle
13.2k
Fork
1.4k
Merge medio
6g 15h
PR unite (30g)
6

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di brianc/node-postgres

Tutte le issue di brianc/node-postgres

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.