Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
26696580
Commit
26696580
authored
Jan 18, 2001
by
Thomas G. Lockhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add "--nodata" option to allow schema conversion only.
parent
b06fbc7a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
contrib/mysql/mysql2pgsql
contrib/mysql/mysql2pgsql
+11
-4
No files found.
contrib/mysql/mysql2pgsql
View file @
26696580
...
...
@@ -15,11 +15,12 @@ use Getopt::Long;
my
$progname
=
"
mysql2pgsql
";
my
$version
=
"
0.3
";
GetOptions
("
debug!
",
"
verbose!
",
"
version
",
"
path=s
",
"
help
");
GetOptions
("
debug!
",
"
verbose!
",
"
version
",
"
path=s
",
"
help
"
,
"
data!
"
);
my
$debug
=
$opt_debug
||
0
;
my
$verbose
=
$opt_verbose
||
0
;
my
$pathfrom
=
$opt_path
||
"";
my
$nodata
=
(
!
$opt_data
);
$pathfrom
=
"
$pathfrom
/
"
if
(
$pathfrom
=~
/.*[^\/]$/
);
...
...
@@ -29,12 +30,15 @@ print "\t(c) 2000 Thomas Lockhart PostgreSQL Inc.\n"
if
(
$opt_version
&&
$opt_verbose
||
$opt_help
);
if
(
$opt_help
)
{
print
"
$0 --verbose --version --help --path=dir infile ...
\n
";
print
"
$0 --verbose --version --help --path=dir
--nodata
infile ...
\n
";
exit
;
}
while
(
@ARGV
)
{
my
$ostem
;
my
$oname
;
my
$pname
;
my
@xargs
;
$iname
=
shift
@ARGV
;
$ostem
=
$iname
;
...
...
@@ -44,7 +48,10 @@ while (@ARGV) {
$oname
=
"
$ostem
.sql92
";
$pname
=
"
$ostem
.init
";
print
"
$iname
$oname
$pname
\n
"
if
(
$debug
);
@xargs
=
(
$iname
,
$oname
);
push
@xargs
,
$pname
unless
(
$nodata
);
print
"
@xargs
\n
"
if
(
$debug
);
TransformDumpFile
(
$iname
,
$oname
,
$pname
);
}
...
...
@@ -68,7 +75,7 @@ sub TransformDumpFile {
push
@dlines
,
$_
;
}
print
"
Calling CreateSchema with $#dlines lines
\n
"
if
(
$debug
);
print
("
Calling CreateSchema with $#dlines lines
\n
")
if
(
$debug
);
@slines
=
CreateSchema
(
@dlines
);
open
(
OUT
,
"
>
$oname
")
||
die
"
Unable to open output file
$oname
";
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment