From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Ron <ronljohnsonjr(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Changing displayed time zone in RAISE NOTICE output? |
Date: | 2023-01-12 16:27:46 |
Message-ID: | 95af71c3-2d32-352e-cd7c-9cd276aee607@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 1/12/23 08:22, Pavel Stehule wrote:
>
>
> čt 12. 1. 2023 v 16:39 odesílatel Adrian Klaver
> <adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>> napsal:
>
> On 1/11/23 21:25, Ron wrote:
> > On 1/11/23 15:06, Adrian Klaver wrote:
>
> >
> > Hmm. I'd have sworn this didn't work when I tried it:
>
> Did you do?:
>
> DO $$
> BEGIN
> RAISE NOTICE '%', clock_timestamp() at timezone 'UTC';
> END$$;
> ERROR: syntax error at or near "timezone"
> LINE 3: RAISE NOTICE '%', clock_timestamp() at timezone 'UTC';
>
>
> there should be space >>AT TIME ZONE<<
>
> (2023-01-12 17:21:10) postgres=# DO $$
> BEGIN
> RAISE NOTICE '%', clock_timestamp() at time zone 'UTC';
> END$$;
> NOTICE: 2023-01-12 16:21:14.063256
> DO
> (2023-01-12 17:21:14) postgres=#
Yeah I know, I was responding to Ron saying his previous attempt had
failed. Using 'timezone' instead of 'time zone' is a mistake I have made
often enough that I threw it out there as a possible cause for the failure.
>
>
> >
> > postgres=#
> > postgres=# DO $$
> > BEGIN
> > RAISE NOTICE '%', clock_timestamp() at time zone 'UTC';
> > END$$;
> > NOTICE: 2023-01-12 05:22:40.517299
> >
> > But it does work, so all's well that ends well.
> >
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
>
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2023-01-12 16:29:55 | Re: Changing displayed time zone in RAISE NOTICE output? |
Previous Message | Dimitrios Apostolou | 2023-01-12 16:24:20 | Why is a hash join preferred when it does not fit in work_mem |