Re: fix side-effect in get_qual_for_list()

From: Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com>
To: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: fix side-effect in get_qual_for_list()
Date: 2017-05-26 19:46:38
Message-ID: CAOgcT0P-PdDKKWR17qt_GZ-SpOC=GD+X1xULeEpkTR=acxoVyg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Ashutosh,

Thanks for catching this. For now this isn't a problem since
> generate_partition_qual() is crafting PartitionBoundInfo which it
> doesn't use anywhere else. But if the function gets used where the
> PartitionBoundSpec is being used somewhere else as well.

Yes, this behavior currently does not affect adversely, but I think this
function is quite useful for future enhancements and should be fixed.

While you are
> at it, can we use castNode() in place of
> PartitionBoundSpec *spec = (PartitionBoundSpec *) bound; Or do you
> think it should be done separately?
>

I have made this change at couple of places applicable.

PFA.

Regards,
Jeevan Ladhe

Attachment Content-Type Size
fix_listdatums_get_qual_for_list_v2.patch application/octet-stream 2.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vik Fearing 2017-05-26 19:50:12 Re: Renaming a table to an array's autogenerated name
Previous Message Tom Lane 2017-05-26 19:20:46 Re: Renaming a table to an array's autogenerated name