split TOAST support out of postgres.h

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: split TOAST support out of postgres.h
Date: 2022-12-28 13:07:14
Message-ID: ddcce239-0f29-6e62-4b47-1f8ca742addf@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Most backend code doesn't actually need the variable-length data types
support (TOAST support) in postgres.h. So I figured we could try to put
it into a separate header file. That makes postgres.h more manageable,
and it avoids including a bunch of complicated unused stuff everywhere.
I picked "varatt.h" as the name. Then we could either

1) Include varatt.h in postgres.h, similar to elog.h and palloc.h. That
way we clean up the files a bit but don't change any external interfaces.

2) Just let everyone who needs it include the new file.

3) Compromise: You can avoid most "damage" by having fmgr.h include
varatt.h. That satisfies most data types and extension code. That way,
there are only a few places that need an explicit include of varatt.h.

I went with the last option in my patch.

Thoughts?

Attachment Content-Type Size
0001-New-header-varatt.h-split-off-from-postgres.h.patch text/plain 32.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Isaac Morland 2022-12-28 14:07:12 Re: split TOAST support out of postgres.h
Previous Message Maxim Orlov 2022-12-28 11:46:23 Re: add \dpS to psql