Giter Site home page Giter Site logo

Comments (4)

darold avatar darold commented on July 16, 2024 1

Theoretically this could be achieved easily but technically every type of SQL or PL/SQL code processing is separated from others using the export type. This mean that if you want to convert pl/sql code you have to use the FUNCTION, PROCEDURE or PACKAGE export type individually with the corresponding file.

For example, let's say you have a file with several Oracle functions inside, using ora2pg as follow:

ora2pg -p -t FUNCTION -i the_oracle_file.sql -o the_postgresql_file.sql

will do the code conversion. This is the same for PL/SQL packages body, just use -t PACKAGE instead.

Since release 10.0 SQL queries can also be converted by the ora2pg SQL code rewritter with the following command:

ora2pg -p -t QUERY -i the_oracle_file.sql -o the_postgresql_file.sql

This will only apply to SELECT, UPDATE, DELETE and INSERT SQL commands.

So using one file per type of SQL code it is already possible, but I understand the need. Can you send me a sample file ? It will help me to have a random file to parse instead of my own well formatted file and not very useful for others :-)

from ora2pg.

vpicavet avatar vpicavet commented on July 16, 2024

We would need a new export type, mixing function, procedure, package and queries contained in a single SQL file. Would that make sense ?

I will send you a sample file privately, as I cannot share it widely.

from ora2pg.

darold avatar darold commented on July 16, 2024

Yes that the goal of the feature: being able to convert anything from an input file using a new export type.

Of course by "send to me" I wanted to say privately.

from ora2pg.

darold avatar darold commented on July 16, 2024

This item can be closed for me, the feature is now included into Ora2Pg. The only thing is that export must be done separately using the different export type, the all-in-one export in a single output file is not possible with the actual design of Ora2Pg.

from ora2pg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.