1*0Sstevel@tonic-gateBEGIN { 2*0Sstevel@tonic-gate use File::Basename; 3*0Sstevel@tonic-gate my $THISDIR = dirname $0; 4*0Sstevel@tonic-gate unshift @INC, $THISDIR; 5*0Sstevel@tonic-gate require "testp2pt.pl"; 6*0Sstevel@tonic-gate import TestPodIncPlainText; 7*0Sstevel@tonic-gate} 8*0Sstevel@tonic-gate 9*0Sstevel@tonic-gatemy %options = map { $_ => 1 } @ARGV; ## convert cmdline to options-hash 10*0Sstevel@tonic-gatemy $passed = testpodplaintext \%options, $0; 11*0Sstevel@tonic-gateexit( ($passed == 1) ? 0 : -1 ) unless $ENV{HARNESS_ACTIVE}; 12*0Sstevel@tonic-gate 13*0Sstevel@tonic-gate 14*0Sstevel@tonic-gate__END__ 15*0Sstevel@tonic-gate 16*0Sstevel@tonic-gate 17*0Sstevel@tonic-gate==head1 NAME 18*0Sstevel@tonic-gateB<rdb2pg> - insert an rdb table into a PostgreSQL database 19*0Sstevel@tonic-gate 20*0Sstevel@tonic-gate==head1 SYNOPSIS 21*0Sstevel@tonic-gateB<rdb2pg> [I<param>=I<value> ...] 22*0Sstevel@tonic-gate 23*0Sstevel@tonic-gate==head1 PARAMETERS 24*0Sstevel@tonic-gateB<rdb2pg> uses an IRAF-compatible parameter interface. 25*0Sstevel@tonic-gateA template parameter file is in F</proj/axaf/simul/lib/uparm/rdb2pg.par>. 26*0Sstevel@tonic-gate 27*0Sstevel@tonic-gate==over 4 28*0Sstevel@tonic-gate==item B<input> I<file> 29*0Sstevel@tonic-gateThe B<RDB> file to insert into the database. If the given name 30*0Sstevel@tonic-gateis the string C<stdin>, it reads from the UNIX standard input stream. 31*0Sstevel@tonic-gate 32*0Sstevel@tonic-gate==back 33*0Sstevel@tonic-gate 34*0Sstevel@tonic-gate==head1 DESCRIPTION 35*0Sstevel@tonic-gateB<rdb2pg> will enter the data from an B<RDB> database into a 36*0Sstevel@tonic-gatePostgreSQL database table, optionally creating the database and the 37*0Sstevel@tonic-gatetable if they do not exist. It automatically determines the 38*0Sstevel@tonic-gatePostgreSQL data type from the column definition in the B<RDB> file, 39*0Sstevel@tonic-gatebut may be overriden via a series of definition files or directly 40*0Sstevel@tonic-gatevia one of its parameters. 41*0Sstevel@tonic-gate 42*0Sstevel@tonic-gateThe target database and table are specified by the C<db> and C<table> 43*0Sstevel@tonic-gateparameters. If they do not exist, and the C<createdb> parameter is 44*0Sstevel@tonic-gateset, they will be created. Table field definitions are determined 45*0Sstevel@tonic-gatein the following order: 46*0Sstevel@tonic-gate 47