Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Update orafce to 4.9 and enhance it #524

Merged
merged 5 commits into from
Jul 23, 2024
Merged

Conversation

foreyes
Copy link
Contributor

@foreyes foreyes commented Jul 18, 2024

Change logs

Describe your change clearly, including what problem is being solved or what feature is being added.

If it has some breaking backward or forward compatibility, please clary.

Why are the changes needed?

Describe why the changes are necessary.

Does this PR introduce any user-facing change?

If yes, please clarify the previous behavior and the change this PR proposes.

How was this patch tested?

Please detail how the changes were tested, including manual tests and any relevant unit or integration tests.

Contributor's Checklist

Here are some reminders and checklists before/when submitting your pull request, please check them:

  • Make sure your Pull Request has a clear title and commit message. You can take git-commit template as a reference.
  • Sign the Contributor License Agreement as prompted for your first-time contribution(One-time setup).
  • Learn the coding contribution guide, including our code conventions, workflow and more.
  • List your communication in the GitHub Issues or Discussions (if has or needed).
  • Document changes.
  • Add tests for the change
  • Pass make installcheck
  • Pass make -C src/test installcheck-cbdb-parallel
  • Feel free to request cloudberrydb/dev team for review and approval when your PR is ready🥳

@foreyes foreyes changed the title Feature: Update Orafce to 4.9 and add functon regexp_not_like() Feature: Update orafce to 4.9 and add functon regexp_not_like() Jul 18, 2024
@foreyes foreyes changed the title Feature: Update orafce to 4.9 and add functon regexp_not_like() Feature: Update orafce to 4.9 and enhance it Jul 18, 2024
higuoxing and others added 4 commits July 22, 2024 10:47
… (#13938)

pipe function from unistd.h.

This PR is back-ported from orafce/orafce@1f162a6

Co-authored-by: Bradford Boyle <[email protected]>
Update orafce to the latest version for further work: to support raw
type in GPDB. (raw is one of the types in Oracle, which is the same as
bytea.)
- cherry-pick the previous modification for orafce to fit GPDB.
- remove decode() supported by orafce, since they have
  already been implemented in GPDB.
- enable set `protransform` in `pg_proc` (this behavior is disabled in
  3.13), since the bug for setting GUC is fixed.
- enable set `typstorage` in `pg_type` with
  `set allow_system_table_mods=true`.

Changes with version 3.13:
- changes the storage type from `plain` to `extended` for varchar2 and
  nvarchar2. `plain` specifies that data of the type will always be
  stored in-line and not compressed. `extended` specifies that the
  system will first try to compress a long data value, and will move
  the value out of the main table row if it's still too long.
- move objects from pg_catalog/public to Oracle schema to avoid
  polluting these namespaces. Refer
  [commit](orafce/orafce@86a1b51)
- varchar2 substr:
   - use oracle_substrb3 instead of bytea_substr
   - use oracle_substrb2 instead of bytea_substr_no_len
- add dbms_sql schema, which provides interfaces to use dynamic SQL to
  parse any DML or DDL statement using PL/SQL.
- add regexp function
- add greatest function
- add least function
- add oracle.unistr
- add oracle.translate_oracle_modifiers
- add oracle.sys_guid
- add oracle.to_char
- add oracle.mod
- add oracle.remainder
- add dbms_utility.get_time
- guarantee function parallel safe (useless for gp)

User behavior changes:
- user needs to set search_path to oracle to use functions in orafce:
  `set search_path = public, oracle;`.

Upgrade from 3.13:
- Users could still use 3.13 orafce in the latest GP7 or upgrade to 4.9
  by `alter extension orafce update to '4.9'`.
- After the upgrade from 3.13, the function/type in public/pg_catalog
  namespace will be moved to oracle namespace. Users who want to use
  these functions/types without code change could set search_path like
  `set search_path = public, oracle`.
@foreyes foreyes force-pushed the orafce branch 2 times, most recently from 18c238b to 4b88159 Compare July 22, 2024 07:14
@my-ship-it
Copy link
Contributor

Should we keep "MERGE COMMIT" ?

@my-ship-it my-ship-it merged commit 7bda696 into apache:main Jul 23, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants