diff --git a/doc/src/sgml/bki.sgml b/doc/src/sgml/bki.sgml index c4ffc61b84b..f7a323ef345 100644 --- a/doc/src/sgml/bki.sgml +++ b/doc/src/sgml/bki.sgml @@ -129,19 +129,19 @@ - Frontend code should not include any pg_xxx.h + Frontend code should not include any pg_xxx.h catalog header file, as these files may contain C code that won't compile outside the backend. (Typically, that happens because these files also contain declarations for functions in src/backend/catalog/ files.) Instead, frontend code may include the corresponding - generated pg_xxx_d.h header, which will contain + generated pg_xxx_d.h header, which will contain OID #defines and any other data that might be of use on the client side. If you want macros or other code in a catalog header to be visible to frontend code, write #ifdef EXPOSE_TO_CLIENT_CODE ... #endif around that section to instruct genbki.pl to copy that section - to the pg_xxx_d.h header. + to the pg_xxx_d.h header. @@ -419,11 +419,9 @@ Use of symbolic references is enabled in a particular catalog column by attaching BKI_LOOKUP(lookuprule) to the column's definition, where lookuprule - is pg_am, pg_proc, - pg_operator, - pg_opclass, - pg_opfamily, - or pg_type. + is pg_am, pg_proc, + pg_operator, pg_opclass, + pg_opfamily, or pg_type. BKI_LOOKUP can be attached to columns of type Oid, regproc, oidvector, or Oid[]; in the latter two cases it implies performing a diff --git a/src/include/catalog/reformat_dat_file.pl b/src/include/catalog/reformat_dat_file.pl index bbceb16b65d..038ba7bb05e 100644 --- a/src/include/catalog/reformat_dat_file.pl +++ b/src/include/catalog/reformat_dat_file.pl @@ -7,8 +7,7 @@ # # Metadata entries (if any) come first, with normal attributes # starting on the following line, in the same order they would be in -# the corresponding table. Comments and non-consecutive blank lines -# are preserved. +# the corresponding table. Comments and blank lines are preserved. # # Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California @@ -109,7 +108,6 @@ foreach my $catname (@catnames) my $catalog = $catalogs{$catname}; my @attnames; my $schema = $catalog->{columns}; - my $prev_blank = 0; foreach my $column (@$schema) { @@ -158,27 +156,22 @@ foreach my $catname (@catnames) my $data_str = format_hash(\%values, @attnames); print $dat $data_str; print $dat " },\n"; - $prev_blank = 0; } # Strings -- handle accordingly or ignore. It was necessary to # ignore bare commas during the initial data conversion. This # should be a no-op now, but we may as well keep that behavior. - # Note: We don't update $prev_blank if we ignore a string. - # Preserve non-consecutive blank lines. + # Preserve blank lines. elsif ($data =~ /^\s*$/) { - next if $prev_blank; print $dat "\n"; - $prev_blank = 1; } # Preserve comments or brackets that are on their own line. elsif ($data =~ /^\s*(\[|\]|#.*?)\s*$/) { print $dat "$1\n"; - $prev_blank = 0; } } close $dat;