Re: hiding variable-length fields from Form_pg_* structs - Mailing list pgsql-hackers

From Robert Haas
Subject Re: hiding variable-length fields from Form_pg_* structs
Date
Msg-id CA+Tgmoa9x85POBboRmfQcMCam9VsYOxDBxGgMECpVVpivovY5g@mail.gmail.com
Whole thread Raw
In response to Re: hiding variable-length fields from Form_pg_* structs  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: hiding variable-length fields from Form_pg_* structs  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Dec 5, 2011 at 2:47 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
>> To clarify, I believe the rule is that the first variable-length field
>> can be accessed as a struct field.  Are there any exceptions to this?
>
> If it is known not null, yes, but I wonder just how many places actually
> depend on that.  It might be better to remove all varlena fields from C
> visibility and require use of the accessor functions.  We should at
> least look into what that would cost us.

My impression is that all the varlena fields also allow nulls.  So I
think there's no point in trying to keep the first one C-accessible.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: hiding variable-length fields from Form_pg_* structs
Next
From: Peter Eisentraut
Date:
Subject: Re: pg_upgrade automatic testing