Code Monkey home page Code Monkey logo

Comments (4)

darold avatar darold commented on September 13, 2024

Commit c93d719 should fix this issue.

from ora2pg.

janopha avatar janopha commented on September 13, 2024

Thanks for your commit. Unfortunately, that did not fix our problem. The error situation is unchanged and is still identical to the issue description.

from ora2pg.

darold avatar darold commented on September 13, 2024

Can you please send me the Oracle package DDL so that I can try to reproduce your problem, you can use my private email if you want, gilles AT darold DOT net.

When I try to reproduce, everything works as expected, here an export with a very long package name:

-- Oracle package 'TEST_GET_SET_LONGSIZE1_LONGSIZE2_LONGSIZE3_LONGSIZE4_LONGSIZE5_LONGSIZE6_LONGSIZE7' declaration, please edit to match PostgreSQL syntax.

DROP SCHEMA IF EXISTS test_get_set_longsize1_longsize2_longsize3_longsize4_longsize5_longsize6_longsize7 CASCADE;
CREATE SCHEMA IF NOT EXISTS test_get_set_longsize1_longsize2_longsize3_longsize4_longsize5_longsize6_longsize7;
CREATE TYPE test_get_set_longsize1_longsize2_longsize3_longsize4_longsize5_longsize6_longsize7.num_array AS (num_array bigint[]);


\ir test_get_set_longsize1_longsize2_longsize3_longsize4_longsize5_longsize6_longsize7/set_record_package.sql
\ir test_get_set_longsize1_longsize2_longsize3_longsize4_longsize5_longsize6_longsize7/get_record_package.sql

of course the name of the schema must be edited to fit the 63 characters but the export is done correctly for what I see.

from ora2pg.

janopha avatar janopha commented on September 13, 2024

In the meantime I also tried to reproduce this error. And I didn't manage to get the same error again with a new package that I created for testing. Package/schema name was exported correctly in the CREATE TYPE statement of the ora2pg export. I only discovered this error with the existing package.

So I also think it's not the long package name what causes this Issue, because I also used long package names for testing.

The Oracle DDL of the existing package should also be correct.

create PACKAGE     ThisIsALongPackageName
AUTHID CURRENT_USER
AS
  TYPE Exampletype
    IS TABLE OF NUMBER(6);


  -- ... functions and procedures ...


END ThisIsALongPackageName;
/

Export result.

DROP SCHEMA IF EXISTS thisisalongpackagename CASCADE;
CREATE SCHEMA IF NOT EXISTS thisisalongpackagename;
CREATE TYPE thisisalongpack.exampletype AS (exampletype integer[]);

The Name of the Type is correct in the CREATE TYPE statement of the export. But the package/schema name in the statement is shorter. As I said, I only noticed this with two existing packages. But they are just named differently and also have the same single TYPE in the CREATE PACKAGE statement (that's why the DDL fits to both).

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.