From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | "jounts(at)gmail(dot)com" <jounts(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #17762: date field casts to null in case section with join's |
Date: | 2023-01-27 14:41:18 |
Message-ID: | CAKFQuwayea_R1pFR62hwiZJX-jxBPCT_2N8xi=b=BPgaYiOYxA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Friday, January 27, 2023, PG Bug reporting form <noreply(at)postgresql(dot)org>
wrote:
> The following bug has been logged on the website:
>
> Bug reference: 17762
> Logged by: Evgeny Nee
> Email address: jounts(at)gmail(dot)com
> PostgreSQL version: 15.1
> Operating system: debian 11
> Description:
>
> Query works fine:
> SELECT id,
> CASE
> WHEN date_field IS NOT NULL THEN date_field::TEXT
> END AS date_str
> FROM my_table
>
> But this query:
> SELECT t1id, t2.name,
> CASE
> WHEN t1.date_field IS NOT NULL THEN t1.date_field::TEXT
> END AS date_str
> FROM my_table t1
> JOIN my_table2 t2 ON t1.id = t2.id
>
> returns: null in date_str
>
>
A self-contained test case would be useful. Something that executes using
psql ideally.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-01-27 16:04:53 | Re: BUG #17761: Questionable regular expression behavior |
Previous Message | hubert depesz lubaczewski | 2023-01-27 12:42:34 | Re: BUG #17761: Questionable regular expression behavior |