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
f88aa2d6
Commit
f88aa2d6
authored
Jan 07, 2002
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update my2pg to version 1.22.
parent
6d6b3e91
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
contrib/mysql/my2pg.pl
contrib/mysql/my2pg.pl
+15
-8
No files found.
contrib/mysql/my2pg.pl
View file @
f88aa2d6
...
...
@@ -35,8 +35,8 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $My2pg: my2pg.pl,v 1.2
1 2001/08/25 18:55:28
fonin Exp $
# $Id: my2pg.pl,v 1.
5 2001/11/21 02:43:30
momjian Exp $
# $My2pg: my2pg.pl,v 1.2
2 2001/12/06 19:32:20
fonin Exp $
# $Id: my2pg.pl,v 1.
6 2002/01/07 22:36:51
momjian Exp $
# TODO:
# + Handle SETs
...
...
@@ -47,8 +47,14 @@
#
# $Log: my2pg.pl,v $
# Revision 1.5 2001/11/21 02:43:30 momjian
# Update my2pg.pl for release.
# Revision 1.6 2002/01/07 22:36:51 momjian
# Update my2pg to version 1.22.
#
# 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
# and match 'UNIQUE KEY'. Otherwise it outputs no unique indexes for the
# postgres dump.
# Thanks to Brad Hilton <bhilton@vpop.net>
#
# Revision 1.21 2001/08/25 18:55:28 fonin
# Incorporated changes from Yunliang Yu <yu@math.duke.edu>:
...
...
@@ -141,7 +147,7 @@ if($opts{d} ne '') {
$|
=
1
;
print
("
------------------------------------------------------------------
");
print
("
\n
-- My2Pg
\
$Revision
: 1.
5
$
\t
ranslated dump
");
print
("
\n
-- My2Pg
\
$Revision
: 1.
6
$
\t
ranslated dump
");
print
("
\n
--
");
print
("
\n
------------------------------------------------------------------
");
...
...
@@ -163,7 +169,7 @@ $libtypename.='/libtypes.so';
# push header to libtypes.c
open
(
LIBTYPES
,"
>
$libtypesource
");
print
LIBTYPES
"
/******************************************************
";
print
LIBTYPES
"
\n
* My2Pg
\
$Revision
: 1.
5
$
\t
ranslated dump
";
print
LIBTYPES
"
\n
* My2Pg
\
$Revision
: 1.
6
$
\t
ranslated dump
";
print
LIBTYPES
"
\n
* User types definitions
";
print
LIBTYPES
"
\n
******************************************************/
";
print
LIBTYPES
"
\n\n
#include <postgres.h>
\n
";
...
...
@@ -627,7 +633,7 @@ CREATE OPERATOR <> (
$tmpfld
=~
s/\s*,\s*/","/g
if
$dq
;
$index
{
$table_name
}[
++
$j
]
=
"
CREATE INDEX
${ky}
_
$table_name
\
_index ON
$dq$table_name$dq
(
$dq$tmpfld$dq
);
";
}
if
(
/^\s*UNIQUE
([\w\d_]+)\s*\((.*)\).*/i
)
{
if
(
/^\s*UNIQUE
.*?
([\w\d_]+)\s*\((.*)\).*/i
)
{
my
$tmpfld
=
$2
;
my
$ky
=
$1
;
$tmpfld
=~
s/,/","/g
if
$dq
;
$index
{
$table_name
}[
++
$j
]
=
"
CREATE UNIQUE INDEX
${ky}
_
$table_name
\
_index ON
$dq$table_name$dq
(
$dq$tmpfld$dq
);
";
...
...
@@ -694,7 +700,7 @@ close(LIBTYPES);
open
(
MAKE
,"
>Makefile
");
print
MAKE
"
#
# My2Pg
\
$Revision
: 1.
5
$
\t
ranslated dump
# My2Pg
\
$Revision
: 1.
6
$
\t
ranslated dump
# Makefile
#
...
...
@@ -908,6 +914,7 @@ B<(c) 2000 Valentine V. Danilchuk (valdan@ziet.zhitomir.ua)>
Jeff Waugh <jaw@ic.net>
Joakim Lemström <jocke@bytewize.com> || <buddyh19@hotmail.com>
Yunliang Yu <yu@math.duke.edu>
Brad Hilton <bhilton@vpop.net>
=head1 LICENSE
...
...
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