Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

Syntax

Updated on 2022-08-16 GMT+08:00

This section describes the syntax added to PostgreSQL Enhanced Edition on the basis of PostgreSQL 11 open-source edition. The following are supported:

  • CREATE SEQUENCE
  • CREATE/ALTER DATABASE
  • CREATE/ALTER VIEW
  • CREATE TABLE
  • CREATE TABLESPACE
  • CLUSTER
  • FORALL
  • CREATE/DROP DIRECTORY
  • ALTER TABLE ADD CONSTRAINT USING INDEX
  • Table names or table aliases for target columns in the INSERT INTO statement
  • ROWNUM in non-partitioned tables
  • CREATE INDEX ON COLUMN_EXPR
  • ALTER TABLE MODIFY
  • Specifying length units for VARCHAR and CHARACTER data types
  • TYPE/NAME/VERSION/VALUE/INTERVAL alias
  • Stored procedures
  • DATE
  • HASH-, RANGE-, and LIST-partitioned table creation
  • MERGE
    MERGE [HINT] INTO table_name USING ({subquery | table_name | view_name}) alias ON (condition) merge_update_clause merge_insert_clause;
  • Time interval operation:
    INTERVAL YEAR TO MONTH,INTERVAL DAY (l) TO SECOND (P);
  • CREATE TRIGGER with BODY:
    CREATE TRIGGER name... {DECLARE ... BEGIN | BEGIN} body END;
  • Stored procedure cursor syntax:
    CURSOR cursor_name [ parameter_list ] IS select_statement, TYPE type_name IS REF CURSOR;
  • Stored procedure cursor variables:
    SQL%ISOPEN,SQL%FOUND,SQL%NOTFOUND,SQL%ROWCOUNT,cursor%ISOPEN,cursor%FOUND,cursor%NOTFOUND,cursor%ROWCOUNT;
  • Scheduled task advanced package:
    DBMS_JOB.SUBMIT,DBMS_JOB.ISUBMIT,DBMS_JOB.REMOVE,DBMS_JOB.BROKEN,DBMS_JOB.CHANGE,DBMS_JOB.WHAT,DBMS_JOB.NEXT_DATE,DBMS_JOB.INTERVAL;
  • CREATE USER:
    {DEFAULT COLLATION | DEFAULT TABLESPACE | [LOCAL] TEMPORARY TABLESPACE} Clause;
  • Session attribute modification:
    ALTER SESSION SET param_name = value;
  • Anonymous blocks
  • Cross-mode access to stored procedures
  • SQLCODE built-in variables in stored procedures
  • Enhanced syntax compatibility in stored procedures: stored procedure names can be used as end tags; FOR VAR IN SELECT-CLAUSE is supported; end tags can be specified for LOOP statements; default value of IN can be specified.
  • Subqueries with no alias specified
  • NOCYCLE in CREATE SEQUENCE
  • Replacing PASSWORD with IDENTIFIED BY in CREATE/ALTER USER
  • Specifying table names or alias in UPDATE SET
  • (columnname)=(value) in UPDATE SET
  • ALTER TABLE support for MODIFY NOT NULL and ENABLE
  • Null character string equivalent to NULL
  • sequencCURRVAL and sequencNEXTVAL
  • Creating users and schemas with same names at the same time
  • Deleting FROM from the table record syntax
  • XML data type pseudo column COLUMN_VALUE
  • OUTER JOIN (+)
  • Operators between the data types INTERVAL and number: +, -, >, <, >=, <=, and <>
  • Partition table DML operations: SELECT, INSERT, UPDATE, and DELETE
  • Composite partitioning of partition tables
  • Expressions used as partition boundaries
  • Trigger DDL: schema
  • Time format: IYY
  • CREATE/ALTER MATERIALIZED VIEW
  • CREATE TYPE
  • CREATE PROFILE
  • Enable/disable syntax for column constraints
  • Tablespace options specified by partitioned tables
  • DROP TABLE tablename [CASCADE CONSTRAINTS] [PURGE]
  • Stored procedure dynamic SQL syntax EXECUTE IMMEDIATE. The current edition does not support dynamic execution of anonymous blocks with DECLARE.
  • FUNCTION definition
  • CONNECT BY queries: LEVEL, CONNECT_BY_ROOT, and CONNECT_BY_ISLEAF pseudo columns; sys_connect_by_path, CONNECT_BY_ROOT, and ORDER SIBLINGS
  • TIME data type precision
  • Supported for virtual columns: column_name datatype [GENERATED ALWAYS] AS (expression) [VIRTUAL]
  • One-dimensional array definition: CREATE OR REPLACE TYPE array_name AS VARRAY (len) OF typename
  • One-dimensional array: array_name.extend, array_name.count, array_name.first, array_name.last
  • ROLLUP, CUBE, and GROUPING SETS Group By supported for grouping_id([expr1[, expr2[, ...exprn]]]) and group_id()
  • Sorting query statements returned by non-grouping fields: SELECT SUM(colname) FROM tbl ORDER BY colname

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback