Author: turnstep
Date: Fri May 2 10:04:44 2008
New Revision: 11185
Modified:
DBD-Pg/trunk/types.c
Log:
Account for new pg_type.h macros
Modified: DBD-Pg/trunk/types.c
==============================================================================
--- DBD-Pg/trunk/types.c (original)
+++ DBD-Pg/trunk/types.c Fri May 2 10:04:44 2008
@@ -373,7 +373,9 @@
my %pgtype;
my $thisname = 0;
while(<F>) {
- if (/^DATA\(insert OID\s+=\s+(\d+)\s+\(\s+(\S+)\s+\S+
\S+\s+\S+\s+[tf]\s+. ([tf]) \\(\d+) (\d+)\s+(\d+) (\d+) (\S+) (\S+) (\S+)
(\S+)/o) {
+ s/FLOAT8PASSBYVAL/t/;
+ s/FLOAT4PASSBYVAL/t/;
+ if (/^DATA\(insert OID\s+=\s+(\d+)\s+\(\s+(\S+)\s+\S+
\S+\s+\S+\s+[t|f]\s+. ([tf]) \\(\d+) (\d+)\s+(\d+) (\d+) (\S+) (\S+) (\S+)
(\S+)/o) {
my
($oid,$name,$typedef,$delim,$typrelid,$typelem,$typarray,$tin,$tout,$bin,$bout)
=
($1,$2,$3,chr(oct($4)),$5,$6,$7,$8,$9,$10,$11);
die "Duplicated OID $oid!: $_\n" if exists $pgtype{$oid};
@@ -402,7 +404,7 @@
$pgtype{$thisname}{description} = $1;
}
elsif (/^DATA/) {
- die "Bad line: $_\n";
+ die "Bad line at $. ->$_\n";
}
}
close(F);
@@ -675,7 +677,7 @@
}
print $newfh "\};\n\n";
-print $newfh "sql_type_info_t* sql_type_data(int sql_type)\n\{\n";
+print $newfh "sql_type_info_t* sql_type_data(int sql_type)\n\{\n\tdTHX;\n\n";
print $newfh "\tswitch(sql_type) \{\n";
for (sort { $pos{$a} <=> $pos{$b} } keys %pos) {