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
8c7e1893
Commit
8c7e1893
authored
Feb 08, 2002
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade my2pg version 1.23.
parent
c7831585
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
contrib/mysql/my2pg.pl
contrib/mysql/my2pg.pl
+14
-10
No files found.
contrib/mysql/my2pg.pl
View file @
8c7e1893
...
@@ -35,8 +35,8 @@
...
@@ -35,8 +35,8 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
# SUCH DAMAGE.
#
#
# $My2pg: my2pg.pl,v 1.2
2
2001/12/06 19:32:20 fonin Exp $
# $My2pg: my2pg.pl,v 1.2
3
2001/12/06 19:32:20 fonin Exp $
# $Id: my2pg.pl,v 1.
6 2002/01/07 22:36:51
momjian Exp $
# $Id: my2pg.pl,v 1.
7 2002/02/08 14:47:56
momjian Exp $
# TODO:
# TODO:
# + Handle SETs
# + Handle SETs
...
@@ -47,8 +47,12 @@
...
@@ -47,8 +47,12 @@
#
#
# $Log: my2pg.pl,v $
# $Log: my2pg.pl,v $
# Revision 1.6 2002/01/07 22:36:51 momjian
# Revision 1.7 2002/02/08 14:47:56 momjian
# Update my2pg to version 1.22.
# Upgrade my2pg version 1.23.
#
# Revision 1.23 2002/02/07 22:13:52 fonin
# Bugfix by Hans-Juergen Schoenig <hs@cybertec.at>: additional space after
# FLOAT8 is required.
#
#
# Revision 1.22 2001/12/06 19:32:20 fonin
# Revision 1.22 2001/12/06 19:32:20 fonin
# Patch: On line 594 where you check for UNIQUE, I believe the regex should try
# Patch: On line 594 where you check for UNIQUE, I believe the regex should try
...
@@ -147,7 +151,7 @@ if($opts{d} ne '') {
...
@@ -147,7 +151,7 @@ if($opts{d} ne '') {
$|
=
1
;
$|
=
1
;
print
("
------------------------------------------------------------------
");
print
("
------------------------------------------------------------------
");
print
("
\n
-- My2Pg
\
$Revision
: 1.6 $
\
t
ranslated dump
");
print
("
\n
-- My2Pg
1.23
translated dump
");
print
("
\n
--
");
print
("
\n
--
");
print
("
\n
------------------------------------------------------------------
");
print
("
\n
------------------------------------------------------------------
");
...
@@ -169,7 +173,7 @@ $libtypename.='/libtypes.so';
...
@@ -169,7 +173,7 @@ $libtypename.='/libtypes.so';
# push header to libtypes.c
# push header to libtypes.c
open
(
LIBTYPES
,"
>
$libtypesource
");
open
(
LIBTYPES
,"
>
$libtypesource
");
print
LIBTYPES
"
/******************************************************
";
print
LIBTYPES
"
/******************************************************
";
print
LIBTYPES
"
\n
* My2Pg
\
$Revision
: 1.
6
$
\t
ranslated dump
";
print
LIBTYPES
"
\n
* My2Pg
\
$Revision
: 1.
7
$
\t
ranslated dump
";
print
LIBTYPES
"
\n
* User types definitions
";
print
LIBTYPES
"
\n
* User types definitions
";
print
LIBTYPES
"
\n
******************************************************/
";
print
LIBTYPES
"
\n
******************************************************/
";
print
LIBTYPES
"
\n\n
#include <postgres.h>
\n
";
print
LIBTYPES
"
\n\n
#include <postgres.h>
\n
";
...
@@ -198,10 +202,10 @@ while (<>) {
...
@@ -198,10 +202,10 @@ while (<>) {
s/bigint\(\d+\)/INT8/i
;
s/bigint\(\d+\)/INT8/i
;
s/int\(\d+\)/INT4/i
;
s/int\(\d+\)/INT4/i
;
s/float(\(\d+,\d*\))/DECIMAL$1/i
;
s/float(\(\d+,\d*\))/DECIMAL$1/i
;
s/double precision/FLOAT8/i
;
s/double precision/FLOAT8
/i
;
s/([\W])double(\(\d+,\d*\))/$1DECIMAL$2/i
;
s/([\W])double(\(\d+,\d*\))/$1DECIMAL$2/i
;
s/([\W])double[\W]/$1FLOAT8/i
;
s/([\W])double[\W]/$1FLOAT8
/i
;
s/([\W])real[\W]/$1FLOAT8/i
;
s/([\W])real[\W]/$1FLOAT8
/i
;
s/([\W])real(\(\d+,\d*\))/$1DECIMAL$2/i
;
s/([\W])real(\(\d+,\d*\))/$1DECIMAL$2/i
;
# Convert string types
# Convert string types
...
@@ -700,7 +704,7 @@ close(LIBTYPES);
...
@@ -700,7 +704,7 @@ close(LIBTYPES);
open
(
MAKE
,"
>Makefile
");
open
(
MAKE
,"
>Makefile
");
print
MAKE
"
#
print
MAKE
"
#
# My2Pg
\
$Revision
: 1.
6
$
\t
ranslated dump
# My2Pg
\
$Revision
: 1.
7
$
\t
ranslated dump
# Makefile
# Makefile
#
#
...
...
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