... configure: using compiler=gcc (GCC) 11.3.1 20221121 (Red Hat 11.3.1-4) configure: using CFLAGS=-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 configure: using CPPFLAGS= -D_GNU_SOURCE configure: using LDFLAGS= -Wl,--as-needed configure: creating ./config.status config.status: creating GNUmakefile config.status: creating src/Makefile.global config.status: creating src/include/pg_config.h config.status: creating src/include/pg_config_ext.h config.status: creating src/interfaces/ecpg/include/ecpg_config.h config.status: linking src/backend/port/tas/dummy.s to src/backend/port/tas.s config.status: linking src/backend/port/posix_sema.c to src/backend/port/pg_sema.c config.status: linking src/backend/port/sysv_shmem.c to src/backend/port/pg_shmem.c config.status: linking src/include/port/linux.h to src/include/pg_config_os.h config.status: linking src/makefiles/Makefile.linux to src/Makefile.port [root@rocky9 IvorySQL-Ivorysql_3.0_Beta]#
ICU 报错
1 2 3 4 5
checking for icu-uc icu-i18n... no configure: error: ICU library not found If you have ICU already installed, see config.log for details on the failure. It is possible the compiler isn't looking in the proper directory. Use --without-icu to disable ICU support.
[ivorysql@rocky9 ~]$ initdb -m pg The files belonging to this database system will be owned by user "ivorysql". This user must also own the server process.
The database cluster will be initialized with locale "en_US.UTF-8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/ivorysql/3/data ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Asia/Shanghai creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok
initdb: warning: enabling "trust" authentication for local connections initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
ivorysql=# select name,setting,short_desc from pg_settings where name like'%ivory%'; name | setting | short_desc -------------------------------------+-------------+---------------------------------------------------------------------- ivorysql.compatible_mode | pg |Setdefaultsql parser compatibility mode ivorysql.database_mode | pg |Set database mode ivorysql.datetime_ignore_nls_mask |0| Sets the datetime type input isnot controlled by the NLS parameter. ivorysql.enable_emptystring_to_NULL | off | whether convertempty string to NULL. ivorysql.identifier_case_switch | interchange |Setcharactercase conversion mode. ivorysql.listen_addresses | localhost | Sets oracle host name or IP address(es) to listen to. ivorysql.port |1521| Sets the Oracle TCP port the server listens on. (7rows)
[ivorysql@rocky9 3]$ initdb -m oracle The files belonging to this database system will be owned by user "ivorysql". This user must also own the server process.
The database cluster will be initialized with locale "en_US.UTF-8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/ivorysql/3/data ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Asia/Shanghai creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok
initdb: warning: enabling "trust" authentication for local connections initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
ivorysql=# select name,setting,short_desc from pg_settings where name like'%ivory%'; name | setting | short_desc -------------------------------------+-------------+---------------------------------------------------------------------- ivorysql.compatible_mode | pg |Setdefaultsql parser compatibility mode ivorysql.database_mode | oracle |Set database mode ivorysql.datetime_ignore_nls_mask |0| Sets the datetime type input isnot controlled by the NLS parameter. ivorysql.enable_emptystring_to_NULL |on| whether convertempty string to NULL. ivorysql.identifier_case_switch | interchange |Setcharactercase conversion mode. ivorysql.listen_addresses | localhost | Sets oracle host name or IP address(es) to listen to. ivorysql.port |1521| Sets the Oracle TCP port the server listens on. (7rows)
此时,创建 varchar2 字段类型的表会报错。
1 2 3 4 5 6
odb=# createtable t(id int, name varchar2(10)); 2023-10-3122:23:41.196 CST [84392] ERROR: type "varchar2" does not exist atcharacter29 2023-10-3122:23:41.196 CST [84392] STATEMENT: createtable t(id int, name varchar2(10)); ERROR: type "varchar2" does not exist LINE 1: createtable t(id int, name varchar2(10)); ^
[ivorysql@rocky93]$ psql -p1521 psql (16.0-ShawnYan) Type "help" for help.
ivorysql=# select name,setting,short_desc from pg_settings where name like'%ivory%'; name | setting | short_desc -------------------------------------+-------------+---------------------------------------------------------------------- ivorysql.compatible_mode | oracle |Setdefaultsql parser compatibility mode ivorysql.database_mode | oracle |Set database mode ivorysql.datetime_ignore_nls_mask |0| Sets the datetime type input isnot controlled by the NLS parameter. ivorysql.enable_emptystring_to_NULL |on| whether convertempty string to NULL. ivorysql.identifier_case_switch | interchange |Setcharactercase conversion mode. ivorysql.listen_addresses | localhost | Sets oracle host name or IP address(es) to listen to. ivorysql.port |1521| Sets the Oracle TCP port the server listens on. (7rows)
再次创建测试表,成功。
1 2 3 4 5 6 7 8 9 10
odb=# createtable t(id int, name varchar2(10)); CREATETABLE odb=# \d t Table "public.t" Column| Type |Collation| Nullable |Default --------+-----------------+-----------+----------+--------- id | pg_catalog.int4 ||| name | varchar2(10) |||