SCM

Forum: feature_requests

Monitor Forum | Start New Thread Start New Thread
permit output to STDOUT [ reply ]
By: Catherine Devlin on 2011-04-25 14:32
[forum:1014381]
Here's a patch allowing the pg.sql argument to be omitted, sending output to STDOUT. This is good for piping output directly into psql.

226,227c226,227
< if (($HELP) || ! defined($ARGV[0]) ) {
< print "\n\nUsage: perl $0 {--help --debug --preserve_case --char2varchar --nodrop --schema --sepfile --enc_in --enc_out } mysql.sql [pg.sql]\n";
---
> if (($HELP) || ! defined($ARGV[0]) || ! defined($ARGV[1])) {
> print "\n\nUsage: perl $0 {--help --debug --preserve_case --char2varchar --nodrop --schema --sepfile --enc_in --enc_out } mysql.sql pg.sql\n";
264,267c264
< if (defined ($ARGV[1])) {
< open(OUT,">:encoding($ENC_OUT)", $ARGV[1]) || die "can't open pg dump file $ARGV[1]"; }
< else {
< open(OUT,">-:encoding($ENC_OUT)"); }
---
> open(OUT,">:encoding($ENC_OUT)", $ARGV[1]) || die "can't open pg dump file $ARGV[1]";

Powered By FusionForge