pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #18743: /src/backend/rewrite/rewriteHandler.c
2+ messages / 2 participants
[nested] [flat]
* BUG #18743: /src/backend/rewrite/rewriteHandler.c
@ 2024-12-09 11:26 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2024-12-09 11:26 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: dan-eli@mail.ru
The following bug has been logged on the website:
Bug reference: 18743
Logged by: Daniel Elishakov
Email address: dan-eli@mail.ru
PostgreSQL version: 16.4
Operating system: ubuntu 20.04
Description:
After having been compared to a NULL value at rewriteHandler.c:852, pointer
'(**new_tles[attrno - 1]).expr' is dereferenced at rewriteHandler.c:859.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #18743: /src/backend/rewrite/rewriteHandler.c
@ 2024-12-09 18:37 David Rowley <dgrowleyml@gmail.com>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: David Rowley @ 2024-12-09 18:37 UTC (permalink / raw)
To: dan-eli@mail.ru; pgsql-bugs@lists.postgresql.org
On Tue, 10 Dec 2024 at 03:14, PG Bug reporting form
<noreply@postgresql.org> wrote:
> After having been compared to a NULL value at rewriteHandler.c:852, pointer
> '(**new_tles[attrno - 1]).expr' is dereferenced at rewriteHandler.c:859.
I'm not sure if I follow the issue here. At 851 we have:
apply_default = ((new_tle == NULL && commandType == CMD_INSERT) ||
(new_tle && new_tle->expr && IsA(new_tle->expr, SetToDefault)));
and at 859:
if (values_rte && new_tle && IsA(new_tle->expr, Var))
I get that the code is a little convoluted here, but I don't spot the
issue. The "having been compared to a NULL" you mention is for setting
the apply_default variable, and that variable does not have any
influence on the if condition at 859.
Can you specifically state the scenario you think will be handled incorrectly?
David
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-12-09 18:37 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-12-09 11:26 BUG #18743: /src/backend/rewrite/rewriteHandler.c PG Bug reporting form <noreply@postgresql.org>
2024-12-09 18:37 ` David Rowley <dgrowleyml@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox