dsn => $dsn,
user => $user,
password => $password,
+ loader_options => { preserve_case => 1 },
+ quote_char => '"',
data_types => {
# http://www.postgresql.org/docs/7.4/interactive/datatype.html
#
# Numeric Types
boolean => { data_type => 'boolean' },
bool => { data_type => 'boolean' },
+ 'bool default false'
+ => { data_type => 'boolean', default_value => \'false' },
bigint => { data_type => 'bigint' },
int8 => { data_type => 'bigint' },
'time with time zone' => { data_type => 'time with time zone' },
'time(2) with time zone' => { data_type => 'time with time zone', size => 2 },
timestamp => { data_type => 'timestamp' },
- 'timestamp default current_timestamp'
- => { data_type => 'timestamp', default_value => \'current_timestamp' },
+ 'timestamp default now()'
+ => { data_type => 'timestamp', default_value => \'current_timestamp',
+ original => { default_value => \'now()' } },
'timestamp(2)' => { data_type => 'timestamp', size => 2 },
'timestamp without time zone' => { data_type => 'timestamp' },
'timestamp(2) without time zone' => { data_type => 'timestamp', size => 2 },
value VARCHAR(100)
)
},
- q{
- COMMENT ON TABLE pg_loader_test1 IS 'The Table'
+ qq{
+ COMMENT ON TABLE pg_loader_test1 IS 'The\15\12Table'
},
- q{
- COMMENT ON COLUMN pg_loader_test1.value IS 'The Column'
+ qq{
+ COMMENT ON COLUMN pg_loader_test1.value IS 'The\15\12Column'
},
q{
CREATE TABLE pg_loader_test2 (
my $code = slurp $filename;
- like $code, qr/^=head1 NAME\n\n^$class - The Table\n\n^=cut\n/m,
+ like $code, qr/^=head1 NAME\n\n^$class - The\nTable\n\n^=cut\n/m,
'table comment';
- like $code, qr/^=head2 value\n\n(.+:.+\n)+\nThe Column\n\n/m,
+ like $code, qr/^=head2 value\n\n(.+:.+\n)+\nThe\nColumn\n\n/m,
'column comment and attrs';
$class = $classes->{pg_loader_test2};