Missing const in DSA.

Started by Mark Gover 7 years ago6 messageshackers
Jump to latest
#1Mark G
markg735@gmail.com

While looking at some of the recent churn in DSA I noticed that
dsa_size_class_map should probably be declared const.

Attachments:

dsa-size-map-const.patchtext/x-patch; charset=US-ASCII; name=dsa-size-map-const.patchDownload+1-1
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Mark G (#1)
Re: Missing const in DSA.

Mark G <markg735@gmail.com> writes:

While looking at some of the recent churn in DSA I noticed that
dsa_size_class_map should probably be declared const.

+1 ... also, given the contents of the array, "char" seems like
rather a misnomer. I'd be happier if it were declared as uint8, say.

regards, tom lane

#3Thomas Munro
thomas.munro@gmail.com
In reply to: Tom Lane (#2)
Re: Missing const in DSA.

On Mon, Sep 24, 2018 at 9:32 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Mark G <markg735@gmail.com> writes:

While looking at some of the recent churn in DSA I noticed that
dsa_size_class_map should probably be declared const.

+1 ... also, given the contents of the array, "char" seems like
rather a misnomer. I'd be happier if it were declared as uint8, say.

+1

--
Thomas Munro
http://www.enterprisedb.com

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Thomas Munro (#3)
Re: Missing const in DSA.

Thomas Munro <thomas.munro@enterprisedb.com> writes:

On Mon, Sep 24, 2018 at 9:32 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Mark G <markg735@gmail.com> writes:

While looking at some of the recent churn in DSA I noticed that
dsa_size_class_map should probably be declared const.

+1 ... also, given the contents of the array, "char" seems like
rather a misnomer. I'd be happier if it were declared as uint8, say.

+1

Are you planning to take care of this?

regards, tom lane

#5Thomas Munro
thomas.munro@gmail.com
In reply to: Tom Lane (#4)
Re: Missing const in DSA.

On Tue, Sep 25, 2018 at 4:17 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Thomas Munro <thomas.munro@enterprisedb.com> writes:

On Mon, Sep 24, 2018 at 9:32 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Mark G <markg735@gmail.com> writes:

While looking at some of the recent churn in DSA I noticed that
dsa_size_class_map should probably be declared const.

+1 ... also, given the contents of the array, "char" seems like
rather a misnomer. I'd be happier if it were declared as uint8, say.

+1

Are you planning to take care of this?

Will do.

--
Thomas Munro
http://www.enterprisedb.com

#6Thomas Munro
thomas.munro@gmail.com
In reply to: Thomas Munro (#5)
Re: Missing const in DSA.

On Tue, Sep 25, 2018 at 7:46 AM Thomas Munro
<thomas.munro@enterprisedb.com> wrote:

On Tue, Sep 25, 2018 at 4:17 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Thomas Munro <thomas.munro@enterprisedb.com> writes:

On Mon, Sep 24, 2018 at 9:32 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Mark G <markg735@gmail.com> writes:

While looking at some of the recent churn in DSA I noticed that
dsa_size_class_map should probably be declared const.

+1 ... also, given the contents of the array, "char" seems like
rather a misnomer. I'd be happier if it were declared as uint8, say.

Pushed. Thanks both for the code review!

--
Thomas Munro
http://www.enterprisedb.com