From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pointless check in RelationBuildPartitionDesc |
Date: | 2018-09-05 13:05:57 |
Message-ID: | 20180905130557.4spqs67cq7jdhoq4@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2018-Sep-05, Amit Langote wrote:
> On 2018/09/05 1:50, Alvaro Herrera wrote:
> > Proposed patch. Checking isnull in a elog(ERROR) is important, because
> > the column is not marked NOT NULL. This is not true for other columns
> > where we simply do Assert(!isnull).
>
> Looks good. Thanks for taking care of other sites as well.
>
> @@ -14705,7 +14705,9 @@ ATExecDetachPartition(Relation rel, RangeVar *name)
>
> (void) SysCacheGetAttr(RELOID, tuple, Anum_pg_class_relpartbound,
> &isnull);
> - Assert(!isnull);
> + if (isnull)
> + elog(ERROR, "null relpartbound for relation %u",
> + RelationGetRelid(partRel));
>
> In retrospect, I'm not sure why this piece of code is here at all; maybe
> just remove the SycCacheGetAttr and Assert?
Yeah, good idea, will do.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2018-09-05 14:00:03 | Re: unaccent(text) fails depending on search_path (WAS: pg_upgrade fails saying function unaccent(text) doesn't exist) |
Previous Message | Alexander Korotkov | 2018-09-05 13:05:17 | Re: [HACKERS] Bug in to_timestamp(). |