Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc7aa599

Browse files
committed
Update my2pg, new version.
1 parent5e00557 commitc7aa599

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

‎contrib/mysql/my2pg.pl

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3636
# SUCH DAMAGE.
3737
#
38-
# $Id: my2pg.pl,v 1.3 2001/03/04 15:43:33 momjian Exp $
38+
# $Id: my2pg.pl,v 1.4 2001/03/06 22:46:50 momjian Exp $
3939

4040
# TODO:
4141
# + Handle SETs
@@ -46,11 +46,16 @@
4646

4747
#
4848
# $Log: my2pg.pl,v $
49-
# Revision 1.3 2001/03/04 15:43:33 momjian
50-
# Update mysql converter, new version released.
49+
# Revision 1.4 2001/03/06 22:46:50 momjian
50+
# Update my2pg, new version.
51+
#
52+
# Revision 1.18 2001/03/06 22:25:40 fonin
53+
# Documentation up2dating.
5154
#
5255
# Revision 1.17 2001/03/04 13:01:50 fonin
53-
# Fixes to make work it right with MySQL 3.23 dumps. Tested on mysqldump 8.11. Also, AUTO_INCREMENT->SERIAL fields no more have DEFAULT and NOT NULL definitions.
56+
# Fixes to make work it right with MySQL 3.23 dumps. Tested on mysqldump 8.11.
57+
# Also, AUTO_INCREMENT->SERIAL fields no more have DEFAULT and NOT NULL
58+
# definitions.
5459
#
5560
# Revision 1.16 2001/02/02 08:15:34 fonin
5661
# Sequences should be created BEFORE creating any objects \nthat depends on it.
@@ -108,7 +113,7 @@
108113
$|=1;
109114

110115
print("------------------------------------------------------------------");
111-
print("\n-- My2Pg\$Revision: 1.3 $\translated dump");
116+
print("\n-- My2Pg\$Revision: 1.4 $\translated dump");
112117
print("\n--");
113118
print("\n------------------------------------------------------------------");
114119

@@ -130,7 +135,7 @@
130135
# push header to libtypes.c
131136
open(LIBTYPES,">$libtypesource");
132137
print LIBTYPES"/******************************************************";
133-
print LIBTYPES"\n * My2Pg\$Revision: 1.3 $\translated dump";
138+
print LIBTYPES"\n * My2Pg\$Revision: 1.4 $\translated dump";
134139
print LIBTYPES"\n * User types definitions";
135140
print LIBTYPES"\n ******************************************************/";
136141
print LIBTYPES"\n\n#include <postgres.h>\n";
@@ -642,7 +647,7 @@
642647

643648
open(MAKE,">Makefile");
644649
print MAKE"#
645-
# My2Pg\$Revision: 1.3 $\translated dump
650+
# My2Pg\$Revision: 1.4 $\translated dump
646651
# Makefile
647652
#
648653
@@ -713,19 +718,15 @@ =head1 NAME
713718
714719
=head1SYNTAX
715720
716-
mysqldump db | ./my2pg.pl [-n] > pgsqldump.txt
721+
mysqldump db | ./my2pg.pl [-n] > pgsqldump.sql
717722
vi libtypes.c
718723
make
719724
psql database < pgsqldump.txt
720725
where
721726
722727
=over4
723728
724-
=itemB<mysqldump.txt>
725-
726-
- mysqldump utility output,
727-
728-
=itemB<pgsqldump.txt>
729+
=itemB<pgsqldump.sql>
729730
730731
- file suitable for loading into PostgreSQL.
731732
@@ -759,6 +760,11 @@ =head1 OVERVIEW
759760
760761
=itemConverting
761762
763+
AUTO_INCREMENT fields to SERIAL. Actually, creating the sequence and
764+
setting default value to nextval('seq'), well, you know :)
765+
766+
=itemConverting
767+
762768
KEY(field) to CREATE INDEX i_field on table (field);
763769
764770
=itemThe same
@@ -767,7 +773,7 @@ =head1 OVERVIEW
767773
768774
=itemIndices
769775
770-
are creating AFTER rows insertion (to speedup the load);
776+
are creating AFTER rows insertion (to speed up the load);
771777
772778
=itemTranslates '#'
773779
@@ -812,7 +818,7 @@ =head1 SIDE EFFECTS
812818
813819
=head1BUGS
814820
815-
This program isvery beta and extremely bugsome.
821+
This program isstill beta. Testers wanted.
816822
Known bugs are:
817823
818824
=over4
@@ -842,8 +848,8 @@ =head1 BUGS
842848
843849
=head1AUTHORS
844850
845-
B<(c) 2000 Maxim V. Rudensky<fonin@ziet.zhitomir.ua>>
846-
B<(c) 2000 Valentine V. Danilchuk<valdan@ziet.zhitomir.ua>>
851+
B<(c) 2000 Maxim V. Rudensky(fonin@ziet.zhitomir.ua)>
852+
B<(c) 2000 Valentine V. Danilchuk(valdan@ziet.zhitomir.ua)>
847853
848854
=head1LICENSE
849855

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp