From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Amit Langote <amitlangote09(at)gmail(dot)com> |
Cc: | Erik Rijkers <er(at)xs4all(dot)nl>, jian he <jian(dot)universality(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: remaining sql/json patches |
Date: | 2023-09-12 07:52:50 |
Message-ID: | d506638e-3f5d-df45-7f11-ac797037253c@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 06.09.23 17:01, Alvaro Herrera wrote:
> Assert()ing that a pointer is not null, and in the next line
> dereferencing that pointer, is useless: the process would crash anyway
> at the time of dereference, so the Assert() adds no value. Better to
> leave the assert out.
I don't think this is quite correct. If you dereference a pointer, the
compiler may assume that it is not null and rearrange code accordingly.
So it might not crash. Keeping the assertion would alter that assumption.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2023-09-12 07:55:53 | Re: psql - pager support - using invisible chars for signalling end of report |
Previous Message | Peter Eisentraut | 2023-09-12 07:46:31 | Re: proposal: psql: show current user in prompt |