@@ -52,7 +52,7 @@ static bool describeOneTSConfig(const char *oid, const char *nspname,
5252static void printACLColumn (PQExpBuffer buf , const char * colname );
5353static bool listOneExtensionContents (const char * extname , const char * oid );
5454
55- static bool isGPDB (void );
55+ static bool isMPP (void );
5656static bool isGPDB4200OrLater (void );
5757static bool isGPDB5000OrLater (void );
5858static bool isGPDB6000OrLater (void );
@@ -64,7 +64,7 @@ static bool validateSQLNamePattern(PQExpBuffer buf, const char *pattern,
6464 const char * visibilityrule ,
6565 bool * added_clause , int maxparts );
6666
67- static bool isGPDB (void )
67+ static bool isMPP (void )
6868{
6969 static enum
7070 {
@@ -86,7 +86,7 @@ static bool isGPDB(void)
8686 return false;
8787
8888 ver = PQgetvalue (res , 0 , 0 );
89- if (strstr (ver , "Cloudberry" ) != NULL )
89+ if (strstr (ver , "Cloudberry" ) != NULL || strstr ( ver , "Greenplum" ) != NULL )
9090 {
9191 PQclear (res );
9292 talking_to_gpdb = gpdb_yes ;
@@ -113,7 +113,7 @@ static bool isGPDB4200OrLater(void)
113113{
114114 bool retValue = false;
115115
116- if (isGPDB () == true)
116+ if (isMPP () == true)
117117 {
118118 PGresult * result ;
119119
@@ -134,7 +134,7 @@ isGPDB4300OrLater(void)
134134{
135135 bool retValue = false;
136136
137- if (isGPDB () == true)
137+ if (isMPP () == true)
138138 {
139139 PGresult * result ;
140140
@@ -157,7 +157,7 @@ static bool isGPDB5000OrLater(void)
157157{
158158 bool retValue = false;
159159
160- if (isGPDB () == true)
160+ if (isMPP () == true)
161161 {
162162 PGresult * res ;
163163
@@ -171,8 +171,8 @@ static bool isGPDB5000OrLater(void)
171171static bool
172172isGPDB6000OrLater (void )
173173{
174- if (!isGPDB ())
175- return false; /* Not Cloudberry at all. */
174+ if (!isMPP ())
175+ return false; /* Not GP-based at all. */
176176
177177 /* GPDB 6 is based on PostgreSQL 9.4 */
178178 return pset .sversion >= 90400 ;
@@ -181,8 +181,8 @@ isGPDB6000OrLater(void)
181181static bool
182182isGPDB6000OrBelow (void )
183183{
184- if (!isGPDB ())
185- return false; /* Not Cloudberry at all. */
184+ if (!isMPP ())
185+ return false; /* Not GP-based at all. */
186186
187187 /* GPDB 6 is based on PostgreSQL 9.4 */
188188 return pset .sversion <= 90400 ;
@@ -191,8 +191,8 @@ isGPDB6000OrBelow(void)
191191static bool
192192isGPDB7000OrLater (void )
193193{
194- if (!isGPDB ())
195- return false; /* Not Cloudberry at all. */
194+ if (!isMPP ())
195+ return false; /* Not GP-based at all. */
196196
197197 /* GPDB 7 is based on PostgreSQL v12 */
198198 return pset .sversion >= 120000 ;
@@ -2007,7 +2007,7 @@ describeOneTableDetails(const char *schemaname,
20072007 "array(select 'toast.' || x from pg_catalog.unnest(tc.reloptions) x), ', ')\n"
20082008 : "''" ),
20092009 /* GPDB Only: relstorage */
2010- (isGPDB () ? "c.relstorage" : "'h'" ),
2010+ (isMPP () ? "c.relstorage" : "'h'" ),
20112011 oid );
20122012 }
20132013 else if (pset .sversion >= 90400 )
@@ -2027,7 +2027,7 @@ describeOneTableDetails(const char *schemaname,
20272027 "array(select 'toast.' || x from pg_catalog.unnest(tc.reloptions) x), ', ')\n"
20282028 : "''" ),
20292029 /* GPDB Only: relstorage */
2030- (isGPDB () ? "c.relstorage" : "'h'" ),
2030+ (isMPP () ? "c.relstorage" : "'h'" ),
20312031 oid );
20322032 }
20332033 else if (pset .sversion >= 90100 )
@@ -2047,7 +2047,7 @@ describeOneTableDetails(const char *schemaname,
20472047 "array(select 'toast.' || x from pg_catalog.unnest(tc.reloptions) x), ', ')\n"
20482048 : "''" ),
20492049 /* GPDB Only: relstorage */
2050- (isGPDB () ? "c.relstorage" : "'h'" ),
2050+ (isMPP () ? "c.relstorage" : "'h'" ),
20512051 oid );
20522052 }
20532053 else if (pset .sversion >= 90000 )
@@ -2066,7 +2066,7 @@ describeOneTableDetails(const char *schemaname,
20662066 "array(select 'toast.' || x from pg_catalog.unnest(tc.reloptions) x), ', ')\n"
20672067 : "''" ),
20682068 /* GPDB Only: relstorage */
2069- (isGPDB () ? "c.relstorage" : "'h'" ),
2069+ (isMPP () ? "c.relstorage" : "'h'" ),
20702070 oid );
20712071 }
20722072 else if (pset .sversion >= 80400 )
@@ -2084,7 +2084,7 @@ describeOneTableDetails(const char *schemaname,
20842084 "array(select 'toast.' || x from pg_catalog.unnest(tc.reloptions) x), ', ')\n"
20852085 : "''" ),
20862086 /* GPDB Only: relstorage */
2087- (isGPDB () ? "c.relstorage" : "'h'" ),
2087+ (isMPP () ? "c.relstorage" : "'h'" ),
20882088 oid );
20892089 }
20902090 else if (pset .sversion >= 80200 )
@@ -2098,7 +2098,7 @@ describeOneTableDetails(const char *schemaname,
20982098 (verbose ?
20992099 "pg_catalog.array_to_string(reloptions, E', ')" : "''" ),
21002100 /* GPDB Only: relstorage */
2101- (isGPDB () ? "relstorage" : "'h'" ),
2101+ (isMPP () ? "relstorage" : "'h'" ),
21022102 oid );
21032103 }
21042104 else if (pset .sversion >= 80000 )
@@ -2161,7 +2161,7 @@ describeOneTableDetails(const char *schemaname,
21612161 tableinfo .isdynamic = strcmp (PQgetvalue (res , 0 , 16 ), "t" ) == 0 ;
21622162
21632163 /* GPDB Only: relstorage */
2164- if (pset .sversion < 120000 && isGPDB ())
2164+ if (pset .sversion < 120000 && isMPP ())
21652165 tableinfo .relstorage = * (PQgetvalue (res , 0 , PQfnumber (res , "relstorage" )));
21662166 else
21672167 tableinfo .relstorage = 'h' ;
@@ -3840,7 +3840,7 @@ describeOneTableDetails(const char *schemaname,
38403840 * listing them.
38413841 */
38423842 tgdef = PQgetvalue (result , i , 1 );
3843- if (isGPDB () && strstr (tgdef , "RI_FKey_" ) != NULL )
3843+ if (isMPP () && strstr (tgdef , "RI_FKey_" ) != NULL )
38443844 list_trigger = false;
38453845
38463846 break ;
@@ -5145,7 +5145,7 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys
51455145 cols_so_far = 4 ;
51465146
51475147 /* Show Storage type for tables */
5148- if (showTables && isGPDB ())
5148+ if (showTables && isMPP ())
51495149 {
51505150 if (isGPDB7000OrLater ())
51515151 {
0 commit comments