1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-24 00:23:06 +03:00

Hide most variable-length fields from Form_pg_* structs

Those fields only appear in the structs so that genbki.pl can create
the BKI bootstrap files for the catalogs.  But they are not actually
usable from C.  So hiding them can prevent coding mistakes, saves
stack space, and can help the compiler.

In certain catalogs, the first variable-length field has been kept
visible after manual inspection.  These exceptions are noted in C
comments.

reviewed by Tom Lane
This commit is contained in:
Peter Eisentraut
2012-01-27 20:16:17 +02:00
parent 8a3f745f16
commit 8137f2c323
32 changed files with 85 additions and 49 deletions

View File

@@ -143,6 +143,7 @@ sub Catalogs
elsif ($declaring_attributes)
{
next if (/^{|^$/);
next if (/^#/);
if (/^}/)
{
undef $declaring_attributes;
@@ -150,6 +151,7 @@ sub Catalogs
else
{
my ($atttype, $attname) = split /\s+/, $_;
die "parse error ($input_file)" unless $attname;
if (exists $RENAME_ATTTYPE{$atttype})
{
$atttype = $RENAME_ATTTYPE{$atttype};