Re: generate syscache info automatically
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: John Naylor <johncnaylorls@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-01-17T12:46:02Z
Lists: pgsql-hackers
Attachments
- v5-0001-Generate-syscache-info-from-catalog-files.patch (text/plain) patch v5-0001
- v5-0002-WIP-Generate-ObjectProperty-from-catalog-files.patch (text/plain) patch v5-0002
On 10.01.24 09:00, John Naylor wrote: >> I suppose a sensible alternative could be to leave the >> DECLARE_..._INDEX... alone and make a separate statement, like >> >> MAKE_SYSCACHE(pg_type_oid_index, TYPEOID, 64); >> >> That's at least visually easier, because some of those >> DECLARE_... lines are getting pretty long. > > Probably a good idea, and below I mention a third possible macro. I updated the patch to use this style (but I swapped the first two arguments from my example, so that the thing being created is named first). I also changed the names of the output files a bit to make them less confusing. (I initially had some files named .c.h, which was weird, but apparently necessary to avoid confusing the build system. But it's all clearer now.) Other than bugs and perhaps style opinions, I think the first patch is pretty good now. I haven't changed much in the second patch, other than to update it for the code changes made in the first patch. It's still very much WIP/preview at the moment.
Commits
-
Generate syscache info from catalog files
- 9b1a6f50b91d 17.0 landed
-
Fill in more of ObjectProperty
- 0c60e8ba80e0 17.0 landed
-
Correct ObjectProperty entry for transforms
- d7ceb41b9b84 17.0 landed
-
genbki.pl: Factor out boilerplate generation
- f94dec76cc7a 17.0 landed
-
Restructure DECLARE_INDEX arguments
- 226d0a6b989b 17.0 landed
-
Update DECLARE_INDEX documentation
- 908f711d2398 15.5 landed
- 4cdcff4d93b2 16.0 landed
- 3c09d115948c 17.0 landed
-
Replace hardcoded switch in object_exists() with a lookup table.
- fa351d5a0db0 9.2.0 cited