| From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
|---|---|
| To: | pgmis(at)posteo(dot)net, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: RFC 9557 / IXDTF |
| Date: | 2025-11-16 21:12:23 |
| Message-ID: | 72d49ca8-535e-4ab9-8156-6cdc43d8942b@aklaver.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 11/16/25 11:43, pgmis(at)posteo(dot)net wrote:
> Hello,
>
> does postgres consider some sort of implementation of rfc9557 IXDTF?
> This is new time internet time format which extends timestamps with
> timezone info together with the offset
> - https://datatracker.ietf.org/doc/html/rfc9557
> - https://en.wikipedia.org/wiki/RFC_9557#Usage
>
> If not, is there some suggestion on how to best store information like
> this?
select '1996-12-19T16:39:57-08:00[America/Los_Angeles]'::timestamp;
ERROR: invalid input syntax for type timestamp:
"1996-12-19T16:39:57-08:00[America/Los_Angeles]"
select '1996-12-19T16:39:57-08:00[America/Los_Angeles]'::timestamptz;
ERROR: invalid input syntax for type timestamp with time zone:
"1996-12-19T16:39:57-08:00[America/Los_Angeles]"
select '1996-12-19T16:39:57-08:00[America/Los_Angeles]'::varchar;
varchar
------------------------------------------------
1996-12-19T16:39:57-08:00[America/Los_Angeles]
Your only option at this point would be to store as a string. That means
though you lose out on using any of the Postgres datetime operators or
functions, unless you do some regex to pull out the timezone portion and
then use that with the datetime string to create a timestamp or
timestamptz. I could see that being wrapped into a function.
>
> Thanks,
> Miroslav
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Rowley | 2025-11-16 21:18:41 | Re: RFC 9557 / IXDTF |
| Previous Message | pgmis | 2025-11-16 19:43:47 | RFC 9557 / IXDTF |