Re: Expanding the use of FLEXIBLE_ARRAY_MEMBER for declarations like foo[1]

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Expanding the use of FLEXIBLE_ARRAY_MEMBER for declarations like foo[1]
Date: 2015-02-20 11:57:50
Message-ID: CAB7nPqTkMgqDuMn1ke6VXvp8pbxu+DujyeeMJ=7KjsUCBGkqzg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 20, 2015 at 4:59 PM, Michael Paquier wrote:
>
> Attached are 3 more patches to improve the coverage (being careful
> this time with calls of offsetof and sizeof...):
> - 0001 covers varlena in c.h
> - 0002 covers HeapTupleHeaderData and MinimalTupleData, with things
> changed in code paths of reorderbuffer and decoder
> - 0003 changes RecordIOData, used in hstore, rowtypes and json functions
>
> Even with this set applied, the following things remain in backend code:
> $ git grep "VARIABLE LENGTH" | grep "[1]"
> [stuff]

Attached is a new series. 0001 and 0002 are the same, 0003 and 0004
the backend structures listed previously. I noticed as well that
indexed_tlist in setrefs.c meritates some attention.

Regards,
--
Michael

Attachment Content-Type Size
0001-Switch-varlena-to-use-FLEXIBLE_ARRAY_MEMBER.patch application/x-patch 2.8 KB
0002-Switch-HeapTupleHeaderData-and-MinimalTupleData-to-u.patch application/x-patch 14.8 KB
0003-Switch-RecordIOData-to-use-FLEXIBLE_ARRAY_MEMBER.patch application/x-patch 4.9 KB
0004-Switch-remaining-structures-to-FLEXIBLE_ARRAY_MEMBER.patch application/x-patch 10.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2015-02-20 12:12:30 Re: Patch: add recovery_timeout option to control timeout of restore_command nonzero status code
Previous Message Alexey Klyukin 2015-02-20 09:15:56 Re: Report search_path value back to the client.