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
d61c7886
Commit
d61c7886
authored
Apr 04, 2002
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to new version of Oracle conversion utility, version 1.8.
Gilles DAROLD
parent
958a1c2a
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1224 additions
and
630 deletions
+1224
-630
contrib/oracle/CHANGES
contrib/oracle/CHANGES
+24
-0
contrib/oracle/Ora2Pg.pm
contrib/oracle/Ora2Pg.pm
+629
-50
contrib/oracle/README.ora2pg
contrib/oracle/README.ora2pg
+193
-102
contrib/oracle/TODO
contrib/oracle/TODO
+3
-6
contrib/oracle/ora2pg.html
contrib/oracle/ora2pg.html
+354
-468
contrib/oracle/ora2pg.pl
contrib/oracle/ora2pg.pl
+21
-4
No files found.
contrib/oracle/CHANGES
View file @
d61c7886
...
...
@@ -24,4 +24,28 @@
- Fix incorrect type translation and many other bug fix
- Add schema only extraction by option schema => 'MYSCHEM'
2001 06 27 - Version 1.4
- Add online Oracle data extraction and insertion into PG database.
- Data export as insert statement (type => DATA)
- Data export as copy from stdin statement (type => COPY)
2001 12 28 - Version 1.5
- Fix LongReadLen problem when exporting Oracle data on LONG and LOB types
Thanks to Stephane Schildknecht for reporting and testing the fix.
- Add more precision on NUMBER type conversion
- Add conversion of type LONG, LOB, FILE
- Fix a problem when extracting data, sometime table could need to be prefixed
by the schema name.
- Fix output of Oracle data extraction. It now require a call to the function
export_data().
2002 01 07 - Version 1.6
- Fix problem exporting NULL value. Thanks to Stephane Schildknecht.
2002 02 14 - Version 1.7
- Remove export of OUTLINE object type. Thanks to Jean-Paul ARGUDO.
2002 03 05 - Version 1.8
- Add Oracle type FLOAT conversion to float8.
- Add column alias extraction on view. Thanks to Jean-Francois RIPOUTEAU
- Add PACKAGE extraction (type => DATA).
contrib/oracle/Ora2Pg.pm
View file @
d61c7886
This diff is collapsed.
Click to expand it.
contrib/oracle/README.ora2pg
View file @
d61c7886
This diff is collapsed.
Click to expand it.
contrib/oracle/TODO
View file @
d61c7886
Here are some more thing to do :
Add possible call to perl function for each field value exported
(data conversion on the fly before dump)
- More precision in type conversion based on length
(I've no good DB to do that)
This will be done as soon as possible
- Fix problem regarding table/constraint output order.
The following need your help :
- Extracting/converting datas.
- SQL queries converter.
- PL/SQL code converter.
contrib/oracle/ora2pg.html
View file @
d61c7886
This diff is collapsed.
Click to expand it.
contrib/oracle/ora2pg.pl
View file @
d61c7886
...
...
@@ -8,7 +8,7 @@
# Copyright: Copyright (c) 2000 : Gilles Darold - All rights reserved -
# Function : Script used to convert Oracle Database schema to PostgreSQL
#------------------------------------------------------------------------------
# Version : 1.
0
# Version : 1.
1
#------------------------------------------------------------------------------
BEGIN
{
...
...
@@ -32,6 +32,9 @@ my $schema = new Ora2Pg (
debug
=>
1
,
# Verbose mode
schema
=>
'
APPS
',
# Extract only APPS schema
type
=>
'
TABLE
',
# Extract table
# type => 'PACKAGE', # Extract PACKAGE information
# type => 'DATA', # Extract data with output as INSERT statement
# type => 'COPY', # Extract data with output as COPY statement
# type => 'VIEW', # Extract views
# type => 'GRANT', # Extract privileges
# type => 'SEQUENCE', # Extract sequences
...
...
@@ -45,11 +48,25 @@ my $schema = new Ora2Pg (
# tables => [('TRIP_DATA')], # Foreign key
# showtableid => 1, # Display only table indice during extraction
# min => 1, # Extract begin at indice 3
# max => 10 # Extract ended at indice 5
# max => 10, # Extract ended at indice 5
# data_limit => 1000, # Extract all data by dump of 1000 tuples
# data_limit => 0, # Extract all data in one pass. Be sure to have enougth memory
);
# Create the POSTGRESQL representation of all objects in the database
$schema
->
export_schema
("
output.sql
");
# Just export data of the following fields from table 's_txcot'
#$schema->modify_struct('s_txcot','dossier', 'rub', 'datapp');
# Function to use for extraction when type option is set to DATA or COPY
# Send exported data to a PostgreSQL database
#$schema->send_to_pgdb('dbi:Pg:dbname=template1;host=localhost;port=5432','test','test');
# Output the data extracted from Oracle DB to a file or to STDOUT if no argument.
# If you set the send_to_pgdb() method the output is given to PG database. See above
#$schema->export_data("output.sql");
# Function to use ifor extraction with other type
# Create the POSTGRESQL representation of all objects in the database
$schema
->
export_schema
("
output.sql
");
exit
(
0
);
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