You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by "robertmu (via GitHub)" <gi...@apache.org> on 2025/07/18 09:56:03 UTC

[I] `CREATE OPERATOR` fails for postfix operators, differing from Greenplum 7 [cloudberry]

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: commits-unsubscribe@cloudberry.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


Re: [I] `CREATE OPERATOR` fails for postfix operators, differing from Greenplum 7 [cloudberry]

Posted by "robertmu (via GitHub)" <gi...@apache.org>.
robertmu commented on issue #1245:
URL: https://github.com/apache/cloudberry/issues/1245#issuecomment-3095082126

   Thank you for the detailed explanation and the link to the PostgreSQL community discussion. This provides perfect clarity on the root cause. However, we may have already communicated to many customers that we are fully compatible with Greenplum 7, so this could become a compatibility issue they complain about in the future.


-- 
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: commits-unsubscribe@cloudberry.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


Re: [I] `CREATE OPERATOR` fails for postfix operators, differing from Greenplum 7 [cloudberry]

Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
tuhaihe commented on issue #1245:
URL: https://github.com/apache/cloudberry/issues/1245#issuecomment-3101357509

   > We may have already communicated to many customers that we are fully compatible with Greenplum 7, so this could become a compatibility issue they complain about in the future.
   
   Aha. That's a good point for Cloudberry on this. We need to create a clear document to illustrate the differences between Cloudberry and Greenplum. I believe Cloudberry is not fully compatible with Greenplum. We need to establish reasonable expectations for users migrating from Greenplum.
   
   


-- 
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: commits-unsubscribe@cloudberry.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


Re: [I] `CREATE OPERATOR` fails for postfix operators, differing from Greenplum 7 [cloudberry]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #1245:
URL: https://github.com/apache/cloudberry/issues/1245#issuecomment-3088864415

   Hi, @robertmu welcome!🎊 Thanks for taking the time to point this out.🙌


-- 
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: commits-unsubscribe@cloudberry.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


Re: [I] `CREATE OPERATOR` fails for postfix operators, differing from Greenplum 7 [cloudberry]

Posted by "yjhjstz (via GitHub)" <gi...@apache.org>.
yjhjstz commented on issue #1245:
URL: https://github.com/apache/cloudberry/issues/1245#issuecomment-3091292880

   
   ## Root Cause
   
   This behavior difference is due to **upstream PostgreSQL changes**. PostgreSQL removed postfix operator support in version 14, as discussed in the community thread: https://postgrespro.com/list/thread-id/2506502
   
   **Why the difference:**
   - **Cloudberry** is based on PostgreSQL 14.4, which no longer supports postfix operators
   - **Greenplum 7** is based on PostgreSQL 12.12, which still retained this feature
   
   The removal was intentional to resolve parser ambiguity issues and simplify grammar handling. Since Cloudberry follows upstream PostgreSQL 14+, this limitation is inherited from the upstream decision.
   
   **Migration recommendation:** Replace postfix operators with equivalent function calls (e.g., `x!` → `factorial(x)`) in DDL scripts when migrating from Greenplum to Cloudberry.


-- 
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: commits-unsubscribe@cloudberry.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


Re: [I] `CREATE OPERATOR` fails for postfix operators, differing from Greenplum 7 [cloudberry]

Posted by "gfphoenix78 (via GitHub)" <gi...@apache.org>.
gfphoenix78 closed issue #1245: `CREATE OPERATOR` fails for postfix operators, differing from Greenplum 7
URL: https://github.com/apache/cloudberry/issues/1245


-- 
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: commits-unsubscribe@cloudberry.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


Re: [I] `CREATE OPERATOR` fails for postfix operators, differing from Greenplum 7 [cloudberry]

Posted by "gfphoenix78 (via GitHub)" <gi...@apache.org>.
gfphoenix78 commented on issue #1245:
URL: https://github.com/apache/cloudberry/issues/1245#issuecomment-3514615669

   It's a feature change from postgres upstream. We'll follow this behavior change.


-- 
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: commits-unsubscribe@cloudberry.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org