Review Board 1.7.22


SQOOP-1149: Support custom postgres types (e.g. inet for IP addresses) - which includes postgres enums.

Review Request #12949 - Created July 25, 2013 and updated

Nick White
Reviewers
Sqoop
sqoop-trunk
The patch adds a PostgresqlExportJob that replaces the OutputFormat (if needed) with a PostgresqlExportOutputFormat that inserts casts into the generated SQL statement (e.g. insert into mytable values (?, ?::inet, ?)). The patch also consolidates the various functions on ConnManager that return SQL type ints and type names into just one for each. This means the chunks of code in various parts of the codebase that select which of the three (former) methods to call can be replaced with a single call - and the call "routing" logic only appears in one place (ConnManager).
I've added two cases to PostgresqlExportTest and tested them against a 9.3 database.
Review request changed
Updated (Aug. 1, 2013, 3:47 p.m.)
(removed unneeded cast)