Skip to content

docs(7.8): document BLOB/CLOB/NCLOB/LONG RAW and six built-in functions, drop rawtohex - #375

Open
qwer381 wants to merge 1 commit into
IvorySQL:v5.6from
qwer381:docs/fix-v5.6-7.8-builtin-types-functions
Open

qwer381 wants to merge 1 commit into
IvorySQL:v5.6from
qwer381:docs/fix-v5.6-7.8-builtin-types-functions

Conversation

@qwer381

@qwer381 qwer381 commented Nov 10, 2026 •

Copy link
Copy Markdown

Complete the 7.8 reference for v5.6: four missing Oracle types, six missing built-in functions, and a rawtohex row that 5.6 never had

Closes #374

What

7.8 Built-in data types / Built-in functions, both CN and EN:

  1. Type table 14 → 18 rows: add blob, clob, nclob, long_raw (sys-schema domain types over bytea / text, defined in src/include/catalog/pg_type.dat).
  2. Function table 48 → 53 rows: add bitand, lpad, rpad, regexp_count, to_clob, to_blob, each with a === section (function, syntax, parameters, return value, example), taking the page from 47 to 53 sections.
  3. Remove the rawtohex row (line 50 in both languages): 5.6 has no such function (grep -ril rawtohex over the 5.6 tree → 0 hits; select rawtohex('abc'::bytea) → ERROR: function rawtohex(bytea) does not exist). It only exists on master, so the v5.6 page should not list it as a current function.

Diffstat:

 CN/modules/ROOT/pages/7.8.adoc | 127 +++++++++++++++++++++++++++++++++++++++-
 EN/modules/ROOT/pages/7.8.adoc | 125 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 249 insertions(+), 3 deletions(-)

Why

The page is the reference for what a 5.6 user may write, and right now it is wrong in both directions: four implemented types and six implemented functions are undiscoverable (Oracle users look for exactly these), while one listed function does not exist.

Type definitions were cross-checked against src/include/catalog/pg_type.dat, function definitions against contrib/ivorysql_ora/src/builtin_functions/builtin_functions--1.0.sql (line numbers are in the issue), and every output block below was captured from a 5.6 instance.

Testing

1. Applies to v5.6

The single commit sits on top of v5.6 @ 7c3f4a6; the diff against v5.6 is

125  2  CN/modules/ROOT/pages/7.8.adoc
124  1  EN/modules/ROOT/pages/7.8.adoc

2. Builds with the repo's generator (Antora 3, same as .github/workflows/pr-preview.yml; start_path: CN / EN):

npx antora antora-playbook.yml      # exit 0
page bytes <tr> <h3>
CN 7.8.html 63911 → 69609 62 → 71 48 → 54
EN 7.8.html 73331 → 80165 62 → 71 48 → 54

+9 rows = 4 types + 6 functions − 1 removed rawtohex; +6 headings = the six new sections. No warning is attributed to 7.8.adoc in either build (the warnings present come from 4.6.2.adoc / 6.3.2.adoc / 7.15.adoc, before and after this change).

3. Every documented example was executed on a 5.6 instance built from tag IvorySQL_5.6 (initdb -m oracle; select version() → PostgreSQL 18.6 (IvorySQL 5.6) ... gcc 13.3.0):

=> select bitand(6, 3) from dual;             => select regexp_count('abcabc', 'a') from dual;
 bitand                                        regexp_count
--------                                       --------------
 2                                                         2
(1 row)                                        (1 row)

=> select lpad('abc', 6, '*') from dual;      => select to_clob('IvorySQL') from dual;
  lpad                                         to_clob
--------                                       ----------
 ***abc                                        IvorySQL
(1 row)                                        (1 row)

=> select rpad('abc', 6, '*') from dual;      => select to_blob('IvorySQL') from dual;
  rpad                                              to_blob
--------                                       --------------------
 abc***                                         \x49766f727953514c
(1 row)                                        (1 row)

=> create table t_types(a blob, b clob, c nclob, d long_raw, e rowid);
CREATE TABLE

The to_clob / to_blob examples were the open question in the issue — both work on 5.6, so the sections now carry real output instead of a bare signature.

Checklist

  • One PR, one topic (7.8 reference completeness for v5.6)
  • CN and EN in sync (same 4 types, same 6 functions, same removal)
  • Every example executed on a 5.6 instance
  • Site builds; rendered row and heading deltas are as stated
  • Closes #374 in the first line
  • Signed-off-by present in the commit

…nctions

7.8 Built-in data types lists only 14 types although src/include/catalog/pg_type.dat
defines sys.blob (domain over bytea), sys.clob and sys.nclob (domains over text) and
sys.long_raw (domain over bytea). The built-in function list is missing six functions
declared in contrib/ivorysql_ora/src/builtin_functions/builtin_functions--1.0.sql:
bitand (both overloads), lpad, rpad, regexp_count, to_clob and to_blob. The same list
also contains rawtohex, which does not exist on this branch (grep over the 5.6 tree
finds nothing and select rawtohex('abc'::bytea) fails; the function is master-only),
so that row is dropped.

Add the four types to the type table, the six functions to the function table, and a
short section per function (syntax / parameters / return value / example) in both the
CN and EN trees. Every example output was captured from an IvorySQL 5.6 instance built
from tag IvorySQL_5.6 (initdb -m oracle), including to_clob and to_blob.

Closes #<ISSUE_NUMBER>

Signed-off-by: 王诗焱 <3372848903@qq.com>
@github-actions
github-actions Bot temporarily deployed to pull request November 10, 2026 14:02 Inactive
@github-actions

Copy link
Copy Markdown

🚀 IvorySQL-Docs Preview Ready

@qwer381

qwer381 commented Nov 10, 2026

Copy link
Copy Markdown
Author

CLA: the Individual Contributor License Agreement for 王诗焱 (GitHub: qwer381) was signed and emailed to cla@ivorysql.org on 2026-11-10 (delivery confirmed by the mail provider).

If the community needs it re-sent to another address, or needs a scanned wet signature instead of the typed one, say the word and I will send it again.

@github-actions

Copy link
Copy Markdown

🚀 IvorySQL-Docs Preview Ready

@github-actions
github-actions Bot temporarily deployed to pull request November 13, 2026 05:57 Inactive
@github-actions

Copy link
Copy Markdown

🚀 IvorySQL-Docs Preview Ready

This branch was previously deployed

1 inactive deployment
pull request — d43afc6d Deployed Nov 13, 2026 by github-actions[bot]
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.

docs(7.8): BLOB/CLOB/NCLOB/LONG RAW and 6 built-in functions are undocumented, and the list contains rawtohex which 5.6 does not have

2 participants