Parse pg_proc.h with entries without OIDs.
This commit is contained in:
parent
7c5e5439d2
commit
bc959b7bd2
@ -145,7 +145,7 @@ sub GenerateFiles {
|
||||
print H "/* fmgroids.h generated for Visual C++ */\n#ifndef FMGROIDS_H\n#define FMGROIDS_H\n\n";
|
||||
open(T,">src\\backend\\utils\\fmgrtab.c") || confess "Could not open fmgrtab.c";
|
||||
print T "/* fmgrtab.c generated for Visual C++ */\n#include \"postgres.h\"\n#include \"utils/fmgrtab.h\"\n\n";
|
||||
foreach my $s (sort {$a->{oid} <=> $b->{oid}} @fmgr) {
|
||||
foreach my $s (sort {intval($a->{oid}) <=> intval($b->{oid})} @fmgr) {
|
||||
next if $seenit{$s->{prosrc}};
|
||||
$seenit{$s->{prosrc}} = 1;
|
||||
print H "#define F_" . uc $s->{prosrc} . " $s->{oid}\n";
|
||||
@ -157,8 +157,9 @@ sub GenerateFiles {
|
||||
my %bmap;
|
||||
$bmap{'t'} = 'true';
|
||||
$bmap{'f'} = 'false';
|
||||
foreach my $s (sort {$a->{oid} <=> $b->{oid}} @fmgr) {
|
||||
print T " { $s->{oid}, \"$s->{prosrc}\", $s->{nargs}, $bmap{$s->{strict}}, $bmap{$s->{retset}}, $s->{prosrc} },\n";
|
||||
foreach my $s (sort {intval($a->{oid}) <=> intval($b->{oid})} @fmgr) {
|
||||
my $o = intval($s->{oid});
|
||||
print T " { $o, \"$s->{prosrc}\", $s->{nargs}, $bmap{$s->{strict}}, $bmap{$s->{retset}}, $s->{prosrc} },\n";
|
||||
}
|
||||
|
||||
|
||||
@ -231,6 +232,14 @@ EOF
|
||||
}
|
||||
}
|
||||
|
||||
sub intval {
|
||||
my $v = shift;
|
||||
if ($v =~ /^\d+$/) {
|
||||
return $v;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub AddProject {
|
||||
my ($self, $name, $type, $folder, $initialdir) = @_;
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $PostgreSQL: pgsql/src/tools/msvc/genbki.pl,v 1.3 2007/02/06 09:16:08 petere Exp $
|
||||
# $PostgreSQL: pgsql/src/tools/msvc/genbki.pl,v 1.4 2007/02/19 14:05:42 mha Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -80,6 +80,9 @@ foreach my $line (split /\n/, $indata) {
|
||||
if ($#fields >=4 && $fields[0] eq "insert" && $fields[1] eq "OID" && $fields[2] eq "=") {
|
||||
$oid = $fields[3];
|
||||
}
|
||||
else {
|
||||
$oid = 0;
|
||||
}
|
||||
$data =~ s/\s{2,}/ /g;
|
||||
$bki .= $data . "\n";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user