robertmu opened a new issue, #1245:
URL: https://github.com/apache/cloudberry/issues/1245

   ### **Issue Description**
   
   **Observed Behavior:**
   
   Cloudberry does not currently support the creation of postfix (or suffix) 
operators. An attempt to create an operator with only a `LEFTARG` specified 
fails with the error `ERROR: operator right argument type must be specified`. 
This behavior differs from Greenplum 7, where the same command succeeds.
   
   **Expected Behavior:**
   
   To improve compatibility with Greenplum 7, it could be beneficial for 
Cloudberry to also support the creation of postfix operators. This would 
potentially allow DDL scripts and applications developed for Greenplum to run 
on Cloudberry with fewer modifications.
   
   ---
   
   ### **Steps to Reproduce**
   
   1.  Connect to a Cloudberry instance using `psql`.
   2.  Run the following `CREATE OPERATOR` command, which attempts to define a 
postfix operator:
   
       ```sql
       CREATE OPERATOR public.## (LEFTARG = bigint, PROCEDURE = numeric_fac);
       ```
   
   3.  **Actual Result:** The command fails with the following error:
       ```
       ERROR:  operator right argument type must be specified
       DETAIL:  Postfix operators are not supported.
       ```
   
   4.  **Expected Result:** Based on the behavior of Greenplum 7, one might 
expect the command to succeed:
       ```
       CREATE OPERATOR
       ```
   
   ---
   
   ### **Environment Details**
   
   *   **Cloudberry Version:**
       ```
       PostgreSQL 14.4 (Apache Cloudberry 2.1.0-devel+dev.2019.g1cc76495e18 
build dev) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 
9.4.0-1ubuntu1~20.04.2) 9.4.0, 64-bit
       ```
   *   **Operating System:** Ubuntu 20.04.2
   
   ---
   
   ### **Comparison with Greenplum 7**
   
   For reference, the exact same `CREATE OPERATOR` statement executes 
successfully on a Greenplum Database 7 instance:
   
   *   **Greenplum 7 Version:**
       ```
       PostgreSQL 12.12 (Greenplum Database 7.0.0-beta.0+482967c1b4 build dev) 
on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, 
64-bit
       ```
   
   ---
   
   ### **Impact**
   
   This difference in behavior means that DDL scripts utilizing postfix 
operators, which are valid in Greenplum 7, will fail on Cloudberry. This 
represents a compatibility difference between the two database systems that may 
require DDL scripts to be modified.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to