dolthub / doltgresql

DoltgreSQL - Version Controlled PostgreSQL
Apache License 2.0
1.07k stars 23 forks source link

Support PostgreSQL datetime literal formats #773

Closed fulghum closed 3 days ago

fulghum commented 1 week ago

From PostgreSQL's date/time data type formatting reference:

Year-Month-Day [ Hour : Minute : Second ] [AD,BC] [ Timezone ] YearMonthDay [ Hour : Minute : Second ] [AD,BC] [ Timezone ] Month Day [ Hour : Minute : Second ] Year [AD,BC] [ Timezone ] where
Year is 4013 BC, ..., very large Month is Jan, Feb, ..., Dec or 1, 2, ..., 12 Day is 1, 2, ..., 31 Hour is 00, 02, ..., 23 Minute is 00, 01, ..., 59 Second is 00, 01, ..., 59 (60 for leap second) Timezone is 3 characters or ISO offset to GMT

  Date Examples:

  Discovered while testing the Pagila data dump