$CondReg ||= $s;
}
-# s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4)/
+ # s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4)/
{
$s =
s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4)/s;
$CondReg ||= $s;
}
-# s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5)/
+ # s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5)/
{
$s =
s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5)/s;
$CondReg ||= $s;
}
-# s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6)/
+ # s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6)/
{
$s =
s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5, INT6)/s;
$CondReg ||= $s;
}
-# s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6, INT7)/
+ # s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6, INT7)/
{
$s =
s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5, INT6, INT7)/s;
$CondReg ||= $s;
}
-# s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6, INT7, INT8)/
+ # s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6, INT7, INT8)/
{
$s =
s /\([^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+, [^,)]+\)/(INT1, INT2, INT3, INT4, INT5, INT6, INT7, INT8)/s;
my $code = $i->{code};
my $ucs = $i->{ucs};
-# BIG5.TXT maps several BIG5 characters to U+FFFD. The UTF-8 to BIG5 mapping can
-# contain only one of them. XXX: Doesn't really make sense to include any of them,
-# but for historical reasons, we map the first one of them.
+ # BIG5.TXT maps several BIG5 characters to U+FFFD. The UTF-8 to BIG5 mapping can
+ # contain only one of them. XXX: Doesn't really make sense to include any of them,
+ # but for historical reasons, we map the first one of them.
if ($i->{ucs} == 0xFFFD && $i->{code} != 0xA15A)
{
$i->{direction} = TO_UNICODE;
print $out "/* src/backend/utils/mb/Unicode/$fname */\n";
print $out "/* This file is generated by $this_script */\n\n";
-# Collect regular, non-combined, mappings, and create the radix tree from them.
+ # Collect regular, non-combined, mappings, and create the radix tree from them.
my $charmap = &make_charmap($out, $charset, $direction, 0);
print_radix_table($out, $tblname, $charmap);
- # Collect combined characters, and create combined character table (if any)
+ # Collect combined characters, and create combined character table (if any)
my $charmap_combined = &make_charmap_combined($charset, $direction);
if (scalar @{$charmap_combined} > 0)
# Move pg_replslot out of $pgdata and create a symlink to it.
$node->stop;
- # Set umask so test directories and files are created with group permissions
+ # Set umask so test directories and files are created with group permissions
umask(0027);
# Enable group permissions on PGDATA
is(scalar(@tblspc_tars), 1, 'one tablespace tar was created');
rmtree("$tempdir/tarbackup2");
- # Create an unlogged table to test that forks other than init are not copied.
+ # Create an unlogged table to test that forks other than init are not copied.
$node->safe_psql('postgres',
'CREATE UNLOGGED TABLE tblspc1_unlogged (id int) TABLESPACE tblspc1;'
);
'unlogged init fork in tablespace');
ok(-f "$pgdata/$tblspc1UnloggedPath", 'unlogged main fork in tablespace');
- # Create files that look like temporary relations to ensure they are ignored
- # in a tablespace.
+ # Create files that look like temporary relations to ensure they are ignored
+ # in a tablespace.
my @tempRelationFiles = qw(t888_888 t888888_888888_vm.1);
my $tblSpc1Id = basename(
dirname(
next;
}
-# If there is a like entry, but no unlike entry, then we will test the like case
+ # If there is a like entry, but no unlike entry, then we will test the like case
if ($tests{$test}->{like}->{$test_key}
&& !defined($tests{$test}->{unlike}->{$test_key}))
{
pgbench(
- # given the expected rate and the 2 ms tx duration, at most one is executed
+ # given the expected rate and the 2 ms tx duration, at most one is executed
'-t 10 --rate=100000 --latency-limit=1 -n -r',
0,
[ qr{processed: [01]/10},
chomp;
- # comment out the line below to make the result file match (blank line wise)
- # the prior version.
- #next if ($_ eq '');
-
- # Dump the action for a rule -
- # stmt_mode indicates if we are processing the 'stmt:'
- # rule (mode==0 means normal, mode==1 means stmt:)
- # flds are the fields to use. These may start with a '$' - in
- # which case they are the result of a previous non-terminal
- #
- # if they dont start with a '$' then they are token name
- #
- # len is the number of fields in flds...
- # leadin is the padding to apply at the beginning (just use for formatting)
+ # comment out the line below to make the result file match (blank line wise)
+ # the prior version.
+ #next if ($_ eq '');
+
+ # Dump the action for a rule -
+ # stmt_mode indicates if we are processing the 'stmt:'
+ # rule (mode==0 means normal, mode==1 means stmt:)
+ # flds are the fields to use. These may start with a '$' - in
+ # which case they are the result of a previous non-terminal
+ #
+ # if they dont start with a '$' then they are token name
+ #
+ # len is the number of fields in flds...
+ # leadin is the padding to apply at the beginning (just use for formatting)
if (/^%%/)
{
next line;
}
- # Dont worry about anything if we're not in the right section of gram.y
+ # Dont worry about anything if we're not in the right section of gram.y
if ($yaccmode != 1)
{
next line;
my $filename = $path . "/ecpg.addons";
open(my $fh, '<', $filename) or die;
- # there may be multiple lines starting ECPG: and then multiple lines of code.
- # the code need to be add to all prior ECPG records.
+ # there may be multiple lines starting ECPG: and then multiple lines of code.
+ # the code need to be add to all prior ECPG records.
my (@needsRules, @code, $record);
# there may be comments before the first ECPG line, skip them
# (included in :default) but aren't considered sufficiently safe
qw[!dbmopen !setpgrp !setpriority],
- # custom is not deemed a likely security risk as it can't be generated from
- # perl so would only be seen if the DBA had chosen to load a module that
- # used it. Even then it's unlikely to be seen because it's typically
- # generated by compiler plugins that operate after PL_op_mask checks.
- # But we err on the side of caution and disable it
+ # custom is not deemed a likely security risk as it can't be generated from
+ # perl so would only be seen if the DBA had chosen to load a module that
+ # used it. Even then it's unlikely to be seen because it's typically
+ # generated by compiler plugins that operate after PL_op_mask checks.
+ # But we err on the side of caution and disable it
qw[!custom],);
printf $fh " /* ALLOWED: @allowed_ops */ \\\n";
section_pre_data => 1, },
unlike => { no_privs => 1, }, },
- # Objects included in extension part of a schema created by this extension */
+ # Objects included in extension part of a schema created by this extension */
'CREATE TABLE regress_pg_dump_schema.test_table' => {
regexp => qr/^
\QCREATE TABLE regress_pg_dump_schema.test_table (\E
# Then count all the tests run against each run
foreach my $test (sort keys %tests)
{
-# If there is a like entry, but no unlike entry, then we will test the like case
+ # If there is a like entry, but no unlike entry, then we will test the like case
if ($tests{$test}->{like}->{$test_key}
&& !defined($tests{$test}->{unlike}->{$test_key}))
{
my $ret;
- # Run psql and capture any possible exceptions. If the exception is
- # because of a timeout and the caller requested to handle that, just return
- # and set the flag. Otherwise, and for any other exception, rethrow.
- #
- # For background, see
- # http://search.cpan.org/~ether/Try-Tiny-0.24/lib/Try/Tiny.pm
+ # Run psql and capture any possible exceptions. If the exception is
+ # because of a timeout and the caller requested to handle that, just return
+ # and set the flag. Otherwise, and for any other exception, rethrow.
+ #
+ # For background, see
+ # http://search.cpan.org/~ether/Try-Tiny-0.24/lib/Try/Tiny.pm
do
{
local $@;
SKIP:
{
- # some Windows Perls at least don't like IPC::Run's start/kill_kill regime.
+ # some Windows Perls at least don't like IPC::Run's start/kill_kill regime.
skip "Test fails on Windows perl", 2 if $Config{osname} eq 'MSWin32';
my $pg_recvlogical = IPC::Run::start(
if ($Config{osname} eq 'MSWin32')
{
- # some Windows Perls at least don't like IPC::Run's start/kill_kill regime.
+ # some Windows Perls at least don't like IPC::Run's start/kill_kill regime.
plan skip_all => "Test fails on Windows perl";
}
else
open my $sslconf, '>', "$pgdata/sslconfig.conf";
close $sslconf;
-# Copy all server certificates and keys, and client root cert, to the data dir
+ # Copy all server certificates and keys, and client root cert, to the data dir
copy_files("ssl/server-*.crt", $pgdata);
copy_files("ssl/server-*.key", $pgdata);
chmod(0600, glob "$pgdata/server-*.key") or die $!;
my ($node, $serverhost, $authmethod) = @_;
my $pgdata = $node->data_dir;
- # Only accept SSL connections from localhost. Our tests don't depend on this
- # but seems best to keep it as narrow as possible for security reasons.
- #
- # When connecting to certdb, also check the client certificate.
+ # Only accept SSL connections from localhost. Our tests don't depend on this
+ # but seems best to keep it as narrow as possible for security reasons.
+ #
+ # When connecting to certdb, also check the client certificate.
open my $hba, '>', "$pgdata/pg_hba.conf";
print $hba
"# TYPE DATABASE USER ADDRESS METHOD\n";
$postgres->AddLibrary('wldap32.lib') if ($solution->{options}->{ldap});
$postgres->FullExportDLL('postgres.lib');
- # The OBJS scraper doesn't know about ifdefs, so remove be-secure-openssl.c
- # if building without OpenSSL
+ # The OBJS scraper doesn't know about ifdefs, so remove be-secure-openssl.c
+ # if building without OpenSSL
if (!$solution->{options}->{openssl})
{
$postgres->RemoveFile('src/backend/libpq/be-secure-common.c');
'src/interfaces/libpq/libpq.rc');
$libpq->AddReference($libpgport);
- # The OBJS scraper doesn't know about ifdefs, so remove fe-secure-openssl.c
- # and sha2_openssl.c if building without OpenSSL, and remove sha2.c if
- # building with OpenSSL.
+ # The OBJS scraper doesn't know about ifdefs, so remove fe-secure-openssl.c
+ # and sha2_openssl.c if building without OpenSSL, and remove sha2.c if
+ # building with OpenSSL.
if (!$solution->{options}->{openssl})
{
$libpq->RemoveFile('src/interfaces/libpq/fe-secure-common.c');
my $perl_path = $solution->{options}->{perl} . '\lib\CORE\*perl*';
-# ActivePerl 5.16 provided perl516.lib; 5.18 provided libperl518.a
-# Starting with ActivePerl 5.24, both perlnn.lib and libperlnn.a are provided.
-# In this case, prefer .lib.
+ # ActivePerl 5.16 provided perl516.lib; 5.18 provided libperl518.a
+ # Starting with ActivePerl 5.24, both perlnn.lib and libperlnn.a are provided.
+ # In this case, prefer .lib.
my @perl_libs =
reverse sort grep { /perl\d+\.lib$|libperl\d+\.a$/ }
glob($perl_path);
{
my ($self) = @_;
-# If doing DLL and haven't specified a DEF file, do a full export of all symbols
-# in the project.
+ # If doing DLL and haven't specified a DEF file, do a full export of all symbols
+ # in the project.
if ($self->{type} eq "dll" && !$self->{def})
{
$self->FullExportDLL($self->{name} . ".lib");
}
-# Warning 4197 is about double exporting, disable this per
-# http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=99193
+ # Warning 4197 is about double exporting, disable this per
+ # http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=99193
$self->DisableLinkerWarnings('4197') if ($self->{platform} eq 'x64');
# Dump the project
return new VS2015Solution(@_);
}
-# visual 2017 hasn't changed the nmake version to 15, so adjust the check to support it.
+ # visual 2017 hasn't changed the nmake version to 15, so adjust the check to support it.
elsif (($visualStudioVersion ge '14.10')
or ($visualStudioVersion eq '15.00'))
{
return new VC2015Project(@_);
}
-# visual 2017 hasn't changed the nmake version to 15, so adjust the check to support it.
+ # visual 2017 hasn't changed the nmake version to 15, so adjust the check to support it.
elsif (($visualStudioVersion ge '14.10')
or ($visualStudioVersion eq '15.00'))
{
{
my ($major, $minor) = @_;
-# visual 2017 hasn't changed the nmake version to 15, so still using the older version for comparison.
+ # visual 2017 hasn't changed the nmake version to 15, so still using the older version for comparison.
if ($major > 14)
{
carp
while (<$f>)
{
- # Expected symbol lines look like:
- #
- # 0 1 2 3 4 5 6
- # IDX SYMBOL SECT SYMTYPE SYMSTATIC SYMNAME
- # ------------------------------------------------------------------------
- # 02E 00000130 SECTA notype External | _standbyState
- # 02F 00000009 SECT9 notype Static | _LocalRecoveryInProgress
- # 064 00000020 SECTC notype () Static | _XLogCheckBuffer
- # 065 00000000 UNDEF notype () External | _BufferGetTag
- #
- # See http://msdn.microsoft.com/en-us/library/b842y285.aspx
- #
- # We're not interested in the symbol index or offset.
- #
- # SECT[ION] is only examined to see whether the symbol is defined in a
- # COFF section of the local object file; if UNDEF, it's a symbol to be
- # resolved at link time from another object so we can't export it.
- #
- # SYMTYPE is always notype for C symbols as there's no typeinfo and no
- # way to get the symbol type from name (de)mangling. However, we care
- # if "notype" is suffixed by "()" or not. The presence of () means the
- # symbol is a function, the absence means it isn't.
- #
- # SYMSTATIC indicates whether it's a compilation-unit local "static"
- # symbol ("Static"), or whether it's available for use from other
- # compilation units ("External"). We export all symbols that aren't
- # static as part of the whole program DLL interface to produce UNIX-like
- # default linkage.
- #
- # SYMNAME is, obviously, the symbol name. The leading underscore
- # indicates that the _cdecl calling convention is used. See
- # http://www.unixwiz.net/techtips/win32-callconv.html
- # http://www.codeproject.com/Articles/1388/Calling-Conventions-Demystified
- #
+ # Expected symbol lines look like:
+ #
+ # 0 1 2 3 4 5 6
+ # IDX SYMBOL SECT SYMTYPE SYMSTATIC SYMNAME
+ # ------------------------------------------------------------------------
+ # 02E 00000130 SECTA notype External | _standbyState
+ # 02F 00000009 SECT9 notype Static | _LocalRecoveryInProgress
+ # 064 00000020 SECTC notype () Static | _XLogCheckBuffer
+ # 065 00000000 UNDEF notype () External | _BufferGetTag
+ #
+ # See http://msdn.microsoft.com/en-us/library/b842y285.aspx
+ #
+ # We're not interested in the symbol index or offset.
+ #
+ # SECT[ION] is only examined to see whether the symbol is defined in a
+ # COFF section of the local object file; if UNDEF, it's a symbol to be
+ # resolved at link time from another object so we can't export it.
+ #
+ # SYMTYPE is always notype for C symbols as there's no typeinfo and no
+ # way to get the symbol type from name (de)mangling. However, we care
+ # if "notype" is suffixed by "()" or not. The presence of () means the
+ # symbol is a function, the absence means it isn't.
+ #
+ # SYMSTATIC indicates whether it's a compilation-unit local "static"
+ # symbol ("Static"), or whether it's available for use from other
+ # compilation units ("External"). We export all symbols that aren't
+ # static as part of the whole program DLL interface to produce UNIX-like
+ # default linkage.
+ #
+ # SYMNAME is, obviously, the symbol name. The leading underscore
+ # indicates that the _cdecl calling convention is used. See
+ # http://www.unixwiz.net/techtips/win32-callconv.html
+ # http://www.codeproject.com/Articles/1388/Calling-Conventions-Demystified
+ #
s/notype \(\)/func/g;
s/notype/data/g;
--entab-leading-whitespace=4
--keep-old-blank-lines=2
--maximum-line-length=78
+--nooutdent-long-comments
--nooutdent-long-quotes
--nospace-for-semicolon
--opening-brace-on-new-line