GaussDB(DWS) gsql and PostgreSQL psql
GaussDB(DWS) gsql differs from PostgreSQL psql in that the former has made the following changes to enhance security:
· User passwords cannot be set by running the \password meta-command.
· The \i+, \ir+, and \include_relative+ meta-commands and the input and output parameter -k are added to encrypt imported and exported files.
· Historical command lines cannot be printed to files using the \s meta-command.
· SQL statements related to sensitive operations, such as those containing passwords, are not recorded. Users cannot see such records when they turn pages or press up or down arrow keys to view the SQL history.
· After a connection is set up, a message is displayed to inform users of password expiration and to show version information.
gsql provides the following additional functions based on psql:
· The output format parameter -r is added to allow you to adjust the focus by pressing the Tab key or arrow keys when entering commands.
· The \parallel meta-command is added to improve execution performance.
· The \set RETRY meta-command is added to support retry upon statement errors.
· Slashes (/) are used as the default terminator at the end of PL/SQL statements CREATE OR REPLACE FUNCTION/PROCEDURE.
About GaussDB(DWS) SQL
What Is SQL?
SQL is a standard computer language used to control the access to databases and manage data in databases.
SQL provides different statements to enable you to:
· Query data.
· Insert, update, and delete rows.
· Create, replace, modify, and delete objects.
· Control the access to a database and its objects.
· Maintain the consistency and integrity of a database.
SQL consists of commands and functions that are used to manage databases and database objects. SQL can also forcibly implement the rules for data types, expressions, and texts. Therefore, section "SQL Reference" describes data types, expressions, functions, and operators in addition to SQL syntax.
Supported SQL Standards
GaussDB(DWS) is compatible with Postgres-XC features and supports the major features of SQL2, SQL3, and SQL4 by default.
Supported by GaussDB(DWS)
|
Not Supported by GaussDB(DWS)
|
|
---|---|---|
Data Types |
· Numeric Types · Monetary Types · Boolean Type · Character Types · Binary Data Types · Date/Time Types · Geometric Types · Network Address Types · Bit String Types · Text Search Types · UUID Type · JSON Types · RoaringBitmap · HLL Data Types · Object Identifier Types · Pseudo-Types · Data Types Supported by Column-Store Tables · XML |
PostgreSQL data types not supported by GaussDB(DWS): · Lines, a geometric type · pg_node_tree |
Functions |
· Logical Operators · Comparison Operators · Character Processing Functions and Operators · Binary String Functions and Operators · Bit String Functions and Operators · Pattern Matching Operators · Numeric Functions and Operators · Date and Time Processing Functions and Operators · Type Conversion Functions · Geometric Functions and Operators · Network Address Functions and Operators · Text Search Functions and Operators · UUID Functions · JSON/JSONB Functions and Operators · Bitmap Functions and Operators · HLL Functions and Operators · SEQUENCE Functions · Array Functions and Operators · Range Functions and Operators · Aggregate Functions · Window Functions · Security Functions · Set Returning Functions · Conditional Expression Functions · System Information Functions · System Administration Functions · Backup and Restoration Control Functions · Database Object Functions · Residual File Management Functions · Data Redaction Functions · Statistics Information Functions · Trigger Functions · XML Functions · Call Stack Recording Functions |
PostgreSQL functions not supported by GaussDB(DWS): Enum support functions Access privilege inquiry functions · has_sequence_privilege(user, sequence, privilege) · has_sequence_privilege(sequence, privilege) System catalog information functions · pg_get_triggerdef(trigger_oid) · pg_get_triggerdef(trigger_oid, pretty_bool) Line functions pg_node_tree |