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
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

Encrypted Equality Functions

Updated on 2024-10-14 GMT+08:00
  • byteawithoutorderwithequalcolin(cstring)

    Description: Converts input data to the internal byteawithoutorderwithequalcol format.

    Parameter type: cstring

    Return type: byteawithoutorderwithequalcol

  • byteawithoutorderwithequalcolout(byteawithoutorderwithequalcol)

    Description: Converts internal data of the byteawithoutorderwithequalcol type to data of the cstring type.

    Parameter type: byteawithoutorderwithequalcol

    Return type: cstring

  • byteawithoutorderwithequalcolsend(byteawithoutorderwithequalcol)

    Description: Converts data of the byteawithoutorderwithequalcol type to data of the bytea type.

    Parameter type: byteawithoutorderwithequalcol

    Return type: bytea

  • byteawithoutorderwithequalcolrecv(internal)

    Description: Converts data of the byteawithoutorderwithequalcol type to data of the byteawithoutorderwithequalcol type.

    Parameter type: internal

    Return type: byteawithoutorderwithequalcol

  • byteawithoutorderwithequalcoltypmodin(_cstring)

    Description: Converts data of the byteawithoutorderwithequalcol type to data of the byteawithoutorderwithequalcol type.

    Parameter type: _cstring

    Return type: int4

  • byteawithoutorderwithequalcoltypmodout(int4)

    Description: Converts data of the int4 type into data of the cstring type.

    Parameter type: int4

    Return type: cstring

  • byteawithoutordercolin(cstring)

    Description: Converts input data to the internal byteawithoutordercolin format.

    Parameter type: cstring

    Return type: byteawithoutordercol

  • byteawithoutordercolout(byteawithoutordercol)

    Description: Converts internal data of the byteawithoutordercol type to data of the cstring type.

    Parameter type: byteawithoutordercol

    Return type: cstring

  • byteawithoutordercolsend(byteawithoutordercol)

    Description: Converts data of the byteawithoutordercol type to data of the bytea type.

    Parameter type: byteawithoutordercol

    Return type: bytea

  • byteawithoutordercolrecv(internal)

    Description: Converts data of the byteawithoutordercol type to data of the byteawithoutordercol type.

    Parameter type: internal

    Return type: byteawithoutordercol

  • byteawithoutorderwithequalcolcmp(byteawithoutorderwithequalcol, byteawithoutorderwithequalcol)

    Description: Compares two byteawithoutorderwithequalcol data sizes. If the first data size is smaller than the second one, –1 is returned. If the first data size is equal to the second one, 0 is returned. If the first data size is larger than the second one, 1 is returned.

    Parameter type: byteawithoutorderwithequalcol, byteawithoutorderwithequalcol

    Return type: int4

  • byteawithoutorderwithequalcolcmpbytear(byteawithoutorderwithequalcol, bytea)

    Description: Compares the byteawithoutorderwithequalcol and bytea data sizes. If the first data size is smaller than the second one, –1 is returned. If the first data size is equal to the second one, 0 is returned. If the first data size is larger than the second one, 1 is returned.

    Parameter type: byteawithoutorderwithequalcol or bytea

    Return type: int4

  • byteawithoutorderwithequalcolcmpbyteal(bytea, byteawithoutorderwithequalcol)

    Description: Compares the bytea and byteawithoutorderwithequalcol data sizes. If the first data size is smaller than the second one, –1 is returned. If the first data size is equal to the second one, 0 is returned. If the first data size is larger than the second one, 1 is returned.

    Parameter type: byteawithoutorderwithequalcol or bytea

    Return type: int4

  • byteawithoutorderwithequalcoleq(byteawithoutorderwithequalcol, byteawithoutorderwithequalcol)

    Description: Compares two byteawithoutorderwithequalcol data records. If they are the same, true is returned. Otherwise, false is returned.

    Parameter type: byteawithoutorderwithequalcol or bytea

    Return type: Boolean

  • byteawithoutorderwithequalcoleqbyteal(bytea, byteawithoutorderwithequalcol)

    Description: Compares the bytea and byteawithoutorderwithequalcol data records. If they are the same, true is returned. Otherwise, false is returned.

    Parameter type: bytea or byteawithoutorderwithequalcol

    Return type: Boolean

  • byteawithoutorderwithequalcoleqbytear(byteawithoutorderwithequalcol, bytea)

    Description: Compares the byteawithoutorderwithequalcol and bytea data records. If they are the same, true is returned. Otherwise, false is returned.

    Parameter type: byteawithoutorderwithequalcol, bytea

    Return type: Boolean

  • byteawithoutorderwithequalcolne(byteawithoutorderwithequalcol, byteawithoutorderwithequalcol)

    Description: Compares two byteawithoutorderwithequalcol data records. If they are different, true is returned. Otherwise, false is returned.

    Parameter type: byteawithoutorderwithequalcol, byteawithoutorderwithequalcol

    Return type: Boolean

  • byteawithoutorderwithequalcolnebyteal(bytea, byteawithoutorderwithequalcol)

    Description: Compares the bytea and byteawithoutorderwithequalcol data records. If they are the same, true is returned. Otherwise, false is returned.

    Parameter type: bytea, byteawithoutorderwithequalcol

    Return type: Boolean

  • byteawithoutorderwithequalcolnebytear(byteawithoutorderwithequalcol, bytea)

    Description: Compares the byteawithoutorderwithequalcol and bytea data records. If they are the same, true is returned. Otherwise, false is returned.

    Parameter type: byteawithoutorderwithequalcol, bytea

    Return type: Boolean

  • hll_hash_byteawithoutorderwithequalcol(byteawithoutorderwithequalcol)

    Description: Returns the hll hash value of byteawithoutorderwithequalcol.

    Parameter type: byteawithoutorderwithequalcol

    Return type: hll_hashval

Example

Functions such as byteawithoutorderwithequalcolin and byteawithoutorderwithequalcolout are read/write format conversion functions such as in, out, send, and recv specified by the data type byteawithoutorderwithequalcol in the database kernel. For details, see the byteain and byteaout functions of the bytea type. However, the local CEK must be verified, and the function can be successfully executed only when the encrypted column contains a CEK OID that can be found on the local host.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
-- In this example, there is an encrypted table int_type, and int_col2 is the encrypted column.

-- Use a non-encrypted client to connect to the database and query the ciphertext of the encrypted column.
openGauss=# select int_col2 from int_type;
                                                                       int_col2
------------------------------------------------------------------------------------------------------------------------------------------------------
 \x01c35301bf421c8edf38c34704bcc82838742917778ccb402a1b7452ad4a6ac7371acc0ac33100000035fe3424919854c86194f1aa5bb4e1ca656e8fc6d05324a1419b69f488bdc3c6
(1 row)

-- The ciphertext of the encrypted column is used as the input parameter of byteawithoutorderwithequalcolin. The format is converted from cstring to byteawithoutorderwithequalcol.
openGauss=# select byteawithoutorderwithequalcolin('\x01c35301bf421c8edf38c34704bcc82838742917778ccb402a1b7452ad4a6ac7371acc0ac33100000035fe3424919854c86194f1aa5bb4e1ca656e8fc6d05324a1419b69f488bdc3c6');
                                                           byteawithoutorderwithequalcolin
------------------------------------------------------------------------------------------------------------------------------------------------------
 \x01c35301bf421c8edf38c34704bcc82838742917778ccb402a1b7452ad4a6ac7371acc0ac33100000035fe3424919854c86194f1aa5bb4e1ca656e8fc6d05324a1419b69f488bdc3c6
(1 row)       

Implementations of functions such as byteawithoutorderwithequalcolin search for CEK and determine whether it is a normal encrypted data type.

If the format of the data entered by the user is not the encrypted data format and the corresponding CEK cannot be found on the local host, an error is returned.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
openGauss=# SELECT * FROM byteawithoutorderwithequalcolsend('\x907219912381298461289346129'::byteawithoutorderwithequalcol);
ERROR:  cek with OID 596711794 not found
LINE 1: SELECT * FROM byteawithoutorderwithequalcolsend('\x907219912...
                                                        ^
openGauss=# SELECT * FROM byteawithoutordercolout('\x90721901999999999999912381298461289346129');
ERROR:  cek with OID 2566986098 not found
LINE 1: SELECT * FROM byteawithoutordercolout('\x9072190199999999999...
   
SELECT * FROM byteawithoutorderwithequalcolrecv('\x90721901999999999999912381298461289346129'::byteawithoutorderwithequalcol);
ERROR:  cek with OID 2566986098 not found
                                           ^
openGauss=# SELECT * FROM byteawithoutorderwithequalcolsend('\x90721901999999999999912381298461289346129'::byteawithoutorderwithequalcol);
ERROR:  cek with OID 2566986098 not found
LINE 1: SELECT * FROM byteawithoutorderwithequalcolsend('\x907219019...
                                                        ^

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