Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
450e728d
Commit
450e728d
authored
23 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Update to my2pg 1.24.
parent
42f2e5bd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
contrib/mysql/my2pg.pl
+28
-7
28 additions, 7 deletions
contrib/mysql/my2pg.pl
with
28 additions
and
7 deletions
contrib/mysql/my2pg.pl
+
28
−
7
View file @
450e728d
...
...
@@ -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
3
2001/12/06 19:32:20 fonin Exp $
# $Id: my2pg.pl,v 1.
7
2002/0
2/08 14:47:56
momjian Exp $
# $My2pg: my2pg.pl,v 1.2
4
2001/12/06 19:32:20 fonin Exp $
# $Id: my2pg.pl,v 1.
8
2002/0
4/24 01:42:29
momjian Exp $
# TODO:
# + Handle SETs
...
...
@@ -47,8 +47,28 @@
#
# $Log: my2pg.pl,v $
# Revision 1.7 2002/02/08 14:47:56 momjian
# Upgrade my2pg version 1.23.
# Revision 1.8 2002/04/24 01:42:29 momjian
# Update to my2pg 1.24.
#
# Revision 1.24 2002/04/20 14:15:43 fonin
# Patch by Felipe Nievinski <fnievinski@terra.com.br>.
# A table I was re-creating had a composite primary key, and I was using
# the -d switch to maintain the table and column names
# adding double quotes around them.
#
# The SQL code generated was something like this:
#
# CREATE TABLE "rinav" (
# "UnidadeAtendimento" INT8 DEFAULT '0' NOT NULL,
# "NumeroRinav" INT8 DEFAULT '0' NOT NULL,
# -- ...
# PRIMARY KEY ("UnidadeAtendimento"," NumeroRinav")
# );
#
# Please note the space inside the second column name string in the PK
# definition. Because of this PostgreSQL was not able to create the table.
#
# FIXED.
#
# Revision 1.23 2002/02/07 22:13:52 fonin
# Bugfix by Hans-Juergen Schoenig <hs@cybertec.at>: additional space after
...
...
@@ -151,7 +171,7 @@ if($opts{d} ne '') {
$|
=
1
;
print
("
------------------------------------------------------------------
");
print
("
\n
-- My2Pg 1.2
3
translated dump
");
print
("
\n
-- My2Pg 1.2
4
translated dump
");
print
("
\n
--
");
print
("
\n
------------------------------------------------------------------
");
...
...
@@ -173,7 +193,7 @@ $libtypename.='/libtypes.so';
# push header to libtypes.c
open
(
LIBTYPES
,"
>
$libtypesource
");
print
LIBTYPES
"
/******************************************************
";
print
LIBTYPES
"
\n
* My2Pg
\$
Revision: 1.
7
$
\t
ranslated dump
";
print
LIBTYPES
"
\n
* My2Pg
\$
Revision: 1.
8
$
\t
ranslated dump
";
print
LIBTYPES
"
\n
* User types definitions
";
print
LIBTYPES
"
\n
******************************************************/
";
print
LIBTYPES
"
\n\n
#include <postgres.h>
\n
";
...
...
@@ -628,6 +648,7 @@ CREATE OPERATOR <> (
if
(
/PRIMARY KEY \((.*)\)/i
)
{
my
$tmpfld
=
$
1
;
$tmpfld
=~
s/,/","/g
if
$dq
;
$tmpfld
=~
s/ //g
;
s/PRIMARY KEY (\(.*\))/PRIMARY KEY \($dq$tmpfld$dq\)/i
;
s/(PRIMARY KEY \(.*\)).*/$1$check\n/i
;
}
...
...
@@ -704,7 +725,7 @@ close(LIBTYPES);
open
(
MAKE
,"
>Makefile
");
print
MAKE
"
#
# My2Pg
\$
Revision: 1.
7
$
\t
ranslated dump
# My2Pg
\$
Revision: 1.
8
$
\t
ranslated dump
# Makefile
#
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment