• 首页
  • 产品中心
    • 数式Oinone四大产品

      低代码开发平台无代码开发平台集成开发平台AI大模型开发
    • 数式Oinone体系能力

      用户与组织权限管理文件管理消息中心国际化业务审计
    • 数式Oinone核心产品特性

      低无一体面向软件公司场景无限制应用级扩容可分可合
  • 服务中心
    • 客户服务

      预约演示方案咨询私有部署找人定制
    • 开发者

      问答下载
    • Oinone学院

      社区学习

    《精讲面向软件公司的低代码平台——以Oinone为例》

  • 合作伙伴
    渠道申请伙伴名录专家库
  • 关于数式
0571-88757863

Data Dialect:[PostgreSQL] Backend Deployment with PostgreSQL Database


I. Driver Configuration

(Ⅰ) Maven Configuration (Suitable for Version 14.3)

<postgresql.version>42.6.0</postgresql.version>
<dependency>
  <groupId>org.postgresql</groupId>
  <artifactId>postgresql</artifactId>
  <version>${postgresql.version}</version>
</dependency>

(Ⅱ) Offline Driver Download

postgresql-42.2.18.jarpostgresql-42.6.0.jarpostgresql-42.7.3.jar

II. JDBC Connection Configuration

pamirs:
  datasource:
    base:
      type: com.alibaba.druid.pool.DruidDataSource
      driverClassName: org.postgresql.Driver
      url: jdbc:postgresql://127.0.0.1:5432/pamirs?currentSchema=base
      username: xxxxxx
      password: xxxxxx
      initialSize: 5
      maxActive: 200
      minIdle: 5
      maxWait: 60000
      timeBetweenEvictionRunsMillis: 60000
      testWhileIdle: true
      testOnBorrow: false
      testOnReturn: false
      poolPreparedStatements: true
      asyncInit: true

Note: For more YAML configurations, please refer to Module API.

(Ⅰ) Connection URL Configuration

No official documentation available currently.

(Ⅱ) URL Format

jdbc:postgresql://${host}:${port}/${database}?currentSchema=${schema}

Warning:

When configuring the JDBC connection, both ${database} and ${schema} must be fully configured and cannot be omitted.

For other connection parameters, you can refer to relevant materials for optimization as needed.

III. Dialect Configuration

(Ⅰ) pamirs Dialect Configuration

pamirs:
  dialect:
    ds:
      base:
        type: PostgreSQL
        version: 14
        major-version: 14.3
      pamirs:
        type: PostgreSQL
        version: 14
        major-version: 14.3

Note: For more YAML configurations, please refer to Module API.

Database VersiontypeversionmajorVersion
14.xPostgreSQL1414.3

Note:

Since the dialect development environment is Version 14.3, other similar versions (14.x) generally will not have significant differences. If you encounter issues with unsupported versions, please leave a comment below the document.

(Ⅱ) Schedule Dialect Configuration

pamirs:
  event:
    enabled: true
    schedule:
      enabled: true
      dialect:
        type: PostgreSQL
        version: 14
        major-version: 14.3
typeversionmajorVersion
PostgreSQL1414.3

Note:

As there are no obvious differences in the schedule dialect across multiple versions, only one dialect configuration is provided currently.

IV. Other Configurations

(Ⅰ) Logical Deletion Value Configuration

pamirs:
  mapper:
    global:
      table-info:
        logic-delete-value: (EXTRACT(epoch FROM CURRENT_TIMESTAMP) * 1000000 + EXTRACT(MICROSECONDS FROM CURRENT_TIMESTAMP))::bigint

(Ⅱ) PostgreSQL Database User Initialization and Authorization

-- init root user (user name can be modified by oneself)

CREATE USER root WITH PASSWORD 'password';

-- if using automatic database and schema creation, this is very important.
ALTER USER root CREATEDB;

SELECT * FROM pg_roles;

-- if using postgres database, this authorization is required.
GRANT CREATE ON DATABASE postgres TO root;
Edit this page
Last Updated:1/15/26, 4:02 AM
Prev
Data Dialect:【OpenGauss】Using OpenGauss Database for Backend Deployment
Next
File Storage:OSS Configuration for MINIO Without Public Network Access
默认页脚
Copyright © 2026 Mr.Hope