This is an automated email from the ASF dual-hosted git repository.
chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/cbdb-postgres-merge by this
push:
new fb03a69e480 Fix some conflicts on catalog
fb03a69e480 is described below
commit fb03a69e480ae8d21506052892f138fd2e61bee7
Author: Jinbao Chen <[email protected]>
AuthorDate: Thu Sep 11 09:35:02 2025 +0800
Fix some conflicts on catalog
---
src/backend/catalog/Makefile | 24 ++---------
src/backend/catalog/genbki.pl | 15 -------
src/backend/catalog/sql_features.txt | 73 +++++++++-----------------------
src/backend/catalog/system_functions.sql | 8 ++--
src/backend/catalog/system_views.sql | 44 +++++--------------
5 files changed, 37 insertions(+), 127 deletions(-)
diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile
index 553893116d0..666a861c6de 100644
--- a/src/backend/catalog/Makefile
+++ b/src/backend/catalog/Makefile
@@ -94,9 +94,8 @@ CATALOG_HEADERS := \
pg_stat_last_operation.h pg_stat_last_shoperation.h \
pg_foreign_table.h pg_foreign_table_seg.h pg_policy.h
pg_replication_origin.h \
pg_default_acl.h pg_init_privs.h pg_seclabel.h pg_shseclabel.h \
-<<<<<<< HEAD
- pg_collation.h pg_partitioned_table.h pg_range.h pg_transform.h \
- pg_sequence.h pg_publication.h pg_publication_rel.h pg_subscription.h \
+ pg_collation.h pg_parameter_acl.h pg_partitioned_table.h pg_range.h
pg_transform.h \
+ pg_sequence.h pg_publication.h pg_publication_namespace.h
pg_publication_rel.h pg_subscription.h \
pg_subscription_rel.h gp_partition_template.h pg_task.h
pg_task_run_history.h \
pg_profile.h pg_password_history.h pg_directory_table.h
gp_storage_server.h \
gp_storage_user_mapping.h pg_tag.h pg_tag_description.h \
@@ -108,12 +107,6 @@ USE_INTERNAL_FTS_FOUND := $(if $(findstring
USE_INTERNAL_FTS,$(CFLAGS)),true,fal
ifeq ($(USE_INTERNAL_FTS_FOUND), true)
CATALOG_HEADERS += gp_segment_configuration.h
endif
-=======
- pg_collation.h pg_parameter_acl.h pg_partitioned_table.h \
- pg_range.h pg_transform.h \
- pg_sequence.h pg_publication.h pg_publication_namespace.h \
- pg_publication_rel.h pg_subscription.h pg_subscription_rel.h
->>>>>>> REL_16_9
GENERATED_HEADERS := $(CATALOG_HEADERS:%.h=%_d.h) schemapg.h system_fk_info.h
@@ -164,16 +157,12 @@ generated-header-symlinks:
$(top_builddir)/src/include/catalog/header-stamp
# configure run, even in distribution tarballs. So depending on configure.ac
# instead is cheating a bit, but it will achieve the goal of updating the
# version number when it changes.
-<<<<<<< HEAD
catalog_data_extra_path =
ifeq ($(enable_catalog_ext),yes)
catalog_data_extra_path = $(top_srcdir)/src/backend/catalog-extension/
endif
-bki-stamp: genbki.pl Catalog.pm $(POSTGRES_BKI_SRCS) $(POSTGRES_BKI_DATA)
$(top_srcdir)/configure.ac $(top_builddir)/src/Makefile.global
-=======
-bki-stamp: genbki.pl Catalog.pm $(POSTGRES_BKI_SRCS) $(POSTGRES_BKI_DATA)
$(top_srcdir)/configure.ac $(top_srcdir)/src/include/access/transam.h
->>>>>>> REL_16_9
+bki-stamp: genbki.pl Catalog.pm $(POSTGRES_BKI_SRCS) $(POSTGRES_BKI_DATA)
$(top_srcdir)/configure.ac $(top_srcdir)/src/include/access/transam.h
$(top_builddir)/src/Makefile.global
$(PERL) $< --include-path=$(top_srcdir)/src/include/ \
--extra-path=$(catalog_data_extra_path) \
--set-version=$(PG_MAJORVERSION) $(POSTGRES_BKI_SRCS)
@@ -222,15 +211,10 @@ installdirs:
.PHONY: uninstall-data
uninstall-data:
-<<<<<<< HEAD
- rm -f $(addprefix '$(DESTDIR)$(datadir)'/, postgres.bki
system_constraints.sql system_functions.sql system_views.sql
information_schema.sql cdb_init.d/cdb_schema.sql cdb_init.d/gp_toolkit.sql
sql_features.txt)
+ rm -f $(addprefix '$(DESTDIR)$(datadir)'/, postgres.bki
system_constraints.sql system_functions.sql system_views.sql
information_schema.sql cdb_init.d/cdb_schema.sql cdb_init.d/gp_toolkit.sql
sql_features.txt fix-CVE-2024-4317.sql)
ifeq ($(USE_INTERNAL_FTS_FOUND), false)
rm -f $(addprefix '$(DESTDIR)$(datadir)'/, external_fts.sql)
endif
-=======
- rm -f $(addprefix '$(DESTDIR)$(datadir)'/, postgres.bki
system_constraints.sql system_functions.sql system_views.sql
information_schema.sql sql_features.txt fix-CVE-2024-4317.sql)
-
->>>>>>> REL_16_9
# postgres.bki, system_constraints.sql, and the generated headers are
# in the distribution tarball, so they are not cleaned here.
clean:
diff --git a/src/backend/catalog/genbki.pl b/src/backend/catalog/genbki.pl
index 34dcff9463b..cb943afa607 100644
--- a/src/backend/catalog/genbki.pl
+++ b/src/backend/catalog/genbki.pl
@@ -30,16 +30,10 @@ my $extra_path;
my $num_errors = 0;
GetOptions(
-<<<<<<< HEAD
'output:s' => \$output_path,
'set-version:s' => \$major_version,
'include-path:s' => \$include_path,
'extra-path:s' => \$extra_path) || usage();
-=======
- 'output:s' => \$output_path,
- 'set-version:s' => \$major_version,
- 'include-path:s' => \$include_path) || usage();
->>>>>>> REL_16_9
# Sanity check arguments.
die "No input files.\n" unless @ARGV;
@@ -911,7 +905,6 @@ sub gen_pg_attribute
{
$attnum = 0;
my @SYS_ATTRS = (
-<<<<<<< HEAD
{ name => 'ctid', type => 'tid' },
{ name => 'xmin', type => 'xid' },
{ name => 'cmin', type => 'cid' },
@@ -920,14 +913,6 @@ sub gen_pg_attribute
{ name => 'tableoid', type => 'oid' },
{ name => 'gp_segment_id', type => 'int4' },
{ name => 'gp_foreign_server', type => 'oid' });
-=======
- { name => 'ctid', type => 'tid' },
- { name => 'xmin', type => 'xid' },
- { name => 'cmin', type => 'cid' },
- { name => 'xmax', type => 'xid' },
- { name => 'cmax', type => 'cid' },
- { name => 'tableoid', type => 'oid' });
->>>>>>> REL_16_9
foreach my $attr (@SYS_ATTRS)
{
$attnum--;
diff --git a/src/backend/catalog/sql_features.txt
b/src/backend/catalog/sql_features.txt
index a5344b62035..5b19bcf950e 100644
--- a/src/backend/catalog/sql_features.txt
+++ b/src/backend/catalog/sql_features.txt
@@ -192,18 +192,12 @@ F052 Intervals and datetime arithmetic
YES
F053 OVERLAPS predicate YES
F054 TIMESTAMP in DATE type precedence list NO
F081 UNION and EXCEPT in views YES
-F111 Isolation levels other than SERIALIZABLE YES
-<<<<<<< HEAD
-F111 Isolation levels other than SERIALIZABLE 01 READ
UNCOMMITTED isolation level NO
-F111 Isolation levels other than SERIALIZABLE 02 READ COMMITTED
isolation level YES
-F111 Isolation levels other than SERIALIZABLE 03 REPEATABLE READ
isolation level NO
-=======
-F112 Isolation level READ UNCOMMITTED YES
+F111 Isolation levels other than SERIALIZABLE YES
+F112 Isolation level READ UNCOMMITTED NO
F113 Isolation level READ COMMITTED YES
-F114 Isolation level REPEATABLE READ YES
+F114 Isolation level REPEATABLE READ NO
F120 Get diagnostics statement NO
->>>>>>> REL_16_9
-F121 Basic diagnostics management NO
+F121 Basic diagnostics management NO
F122 Enhanced diagnostics management NO
F123 All diagnostics NO
F124 SET TRANSACTION statement: DIAGNOSTICS SIZE clause
NO
@@ -271,26 +265,16 @@ F405 NATURAL JOIN YES
F406 FULL OUTER JOIN YES
F407 CROSS JOIN YES
F411 Time zone specification YES differences regarding
literal interpretation
-F421 National character YES
-<<<<<<< HEAD
-F431 Read-only scrollable cursors YES forward scroll
only
-F431 Read-only scrollable cursors 01 FETCH with explicit NEXT
YES
-F431 Read-only scrollable cursors 02 FETCH FIRST NO
-F431 Read-only scrollable cursors 03 FETCH LAST YES
-F431 Read-only scrollable cursors 04 FETCH PRIOR NO
-F431 Read-only scrollable cursors 05 FETCH ABSOLUTE NO
-F431 Read-only scrollable cursors 06 FETCH RELATIVE NO
-=======
+F421 National character YES
F431 Read-only scrollable cursors YES
F432 FETCH with explicit NEXT YES
-F433 FETCH FIRST YES
+F433 FETCH FIRST NO
F434 FETCH LAST YES
-F435 FETCH PRIOR YES
-F436 FETCH ABSOLUTE YES
-F437 FETCH RELATIVE YES
+F435 FETCH PRIOR NO
+F436 FETCH ABSOLUTE NO
+F437 FETCH RELATIVE NO
F438 Scrollable cursors YES
->>>>>>> REL_16_9
-F441 Extended set function support YES
+F441 Extended set function support YES
F442 Mixed column references in set functions YES
F451 Character set definition NO
F461 Named character sets NO
@@ -464,37 +448,20 @@ T176 Sequence generator support
NO supported except for NEXT VALUE FOR
T177 Sequence generator support: simple restart option
YES
T178 Identity columns: simple restart option YES
T180 System-versioned tables NO
-T181 Application-time period tables NO
-<<<<<<< HEAD
-T191 Referential action RESTRICT NO
-T201 Comparable data types for referential constraints
NO
-T211 Basic trigger capability NO
-T211 Basic trigger capability 01 Triggers activated on UPDATE,
INSERT, or DELETE of one base table NO
-T211 Basic trigger capability 02 BEFORE triggers NO
-T211 Basic trigger capability 03 AFTER triggers NO
-T211 Basic trigger capability 04 FOR EACH ROW triggers NO
-T211 Basic trigger capability 05 Ability to specify a search
condition that must be true before the trigger is invoked NO
-T211 Basic trigger capability 06 Support for run-time rules for
the interaction of triggers and constraints NO
-T211 Basic trigger capability 07 TRIGGER privilege YES
-T211 Basic trigger capability 08 Multiple triggers for the same
event are executed in the order in which they were created in the catalog
NO intentionally omitted
-T212 Enhanced trigger capability NO
-T213 INSTEAD OF triggers NO
-T231 Sensitive cursors YES
-=======
-T191 Referential action RESTRICT YES
+T181 Application-time period tables NO
+T191 Referential action RESTRICT NO
T200 Trigger DDL NO similar but not fully compatible
-T201 Comparable data types for referential constraints
YES
+T201 Comparable data types for referential constraints
NO
T211 Basic trigger capability NO
-T212 Enhanced trigger capability YES
-T213 INSTEAD OF triggers YES
-T214 BEFORE triggers YES
-T215 AFTER triggers YES
-T216 Ability to require true search condition before trigger is invoked
YES
+T212 Enhanced trigger capability NO
+T213 INSTEAD OF triggers NO
+T214 BEFORE triggers NO
+T215 AFTER triggers NO
+T216 Ability to require true search condition before trigger is invoked
NO
T217 TRIGGER privilege YES
T218 Multiple triggers for the same event executed in the order created
NO intentionally omitted
-T231 Sensitive cursors NO
->>>>>>> REL_16_9
-T241 START TRANSACTION statement YES
+T231 Sensitive cursors YES
+T241 START TRANSACTION statement YES
T251 SET TRANSACTION statement: LOCAL option NO
T261 Chained transactions YES
T262 Multiple server transactions NO
diff --git a/src/backend/catalog/system_functions.sql
b/src/backend/catalog/system_functions.sql
index bdcf45352a9..39c4c309a0b 100644
--- a/src/backend/catalog/system_functions.sql
+++ b/src/backend/catalog/system_functions.sql
@@ -739,17 +739,15 @@ REVOKE EXECUTE ON FUNCTION pg_ls_dir(text) FROM public;
REVOKE EXECUTE ON FUNCTION pg_ls_dir(text,boolean,boolean) FROM public;
-REVOKE EXECUTE ON FUNCTION pg_log_backend_memory_contexts(integer) FROM PUBLIC;
-<<<<<<< HEAD
-=======
-
REVOKE EXECUTE ON FUNCTION pg_ls_logicalsnapdir() FROM PUBLIC;
REVOKE EXECUTE ON FUNCTION pg_ls_logicalmapdir() FROM PUBLIC;
REVOKE EXECUTE ON FUNCTION pg_ls_replslotdir(text) FROM PUBLIC;
->>>>>>> REL_16_9
+REVOKE EXECUTE ON FUNCTION pg_log_backend_memory_contexts(integer) FROM PUBLIC;
+
+
--
-- We also set up some things as accessible to standard roles.
--
diff --git a/src/backend/catalog/system_views.sql
b/src/backend/catalog/system_views.sql
index ae4038484e0..0e0802dbb1f 100644
--- a/src/backend/catalog/system_views.sql
+++ b/src/backend/catalog/system_views.sql
@@ -1,13 +1,9 @@
/*
* PostgreSQL System Views
*
-<<<<<<< HEAD
* Portions Copyright (c) 2006-2010, Greenplum inc.
* Portions Copyright (c) 2012-Present VMware, Inc. or its affiliates.
- * Copyright (c) 1996-2021, PostgreSQL Global Development Group
-=======
* Copyright (c) 1996-2023, PostgreSQL Global Development Group
->>>>>>> REL_16_9
*
* src/backend/catalog/system_views.sql
*
@@ -865,26 +861,8 @@ CREATE VIEW pg_statio_all_tables AS
FROM pg_class C LEFT JOIN
pg_class T ON C.reltoastrelid = T.oid
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
-<<<<<<< HEAD
WHERE C.relkind IN ('r', 't', 'm', 'o', 'b', 'M')
GROUP BY C.oid, N.nspname, C.relname, T.oid, X.indexrelid;
-=======
- LEFT JOIN LATERAL (
- SELECT sum(pg_stat_get_blocks_fetched(indexrelid) -
- pg_stat_get_blocks_hit(indexrelid))::bigint
- AS idx_blks_read,
- sum(pg_stat_get_blocks_hit(indexrelid))::bigint
- AS idx_blks_hit
- FROM pg_index WHERE indrelid = C.oid ) I ON true
- LEFT JOIN LATERAL (
- SELECT sum(pg_stat_get_blocks_fetched(indexrelid) -
- pg_stat_get_blocks_hit(indexrelid))::bigint
- AS idx_blks_read,
- sum(pg_stat_get_blocks_hit(indexrelid))::bigint
- AS idx_blks_hit
- FROM pg_index WHERE indrelid = T.oid ) X ON true
- WHERE C.relkind IN ('r', 't', 'm');
->>>>>>> REL_16_9
CREATE VIEW pg_statio_sys_tables AS
SELECT * FROM pg_statio_all_tables
@@ -1874,7 +1852,16 @@ GRANT SELECT (oid, subdbid, subskiplsn, subname,
subowner, subenabled,
subslotname, subsynccommit, subpublications, suborigin)
ON pg_subscription TO public;
-<<<<<<< HEAD
+CREATE VIEW pg_stat_subscription_stats AS
+SELECT
+ ss.subid,
+ s.subname,
+ ss.apply_error_count,
+ ss.sync_error_count,
+ ss.stats_reset
+FROM pg_subscription as s,
+ pg_stat_get_subscription_stats(s.oid) as ss;
+
-- Dispatch and Aggregate the backends information of subtransactions
overflowed
CREATE VIEW gp_suboverflowed_backend(segid, pids) AS
SELECT -1, gp_get_suboverflowed_backends()
@@ -1970,14 +1957,3 @@ CREATE VIEW relation_tag_descriptions AS
pg_namespace AS ns
WHERE td.tagid = t.oid AND td.tdobjid = c.oid
AND td.tddatabaseid = d.oid AND ns.oid = c.relnamespace;
-=======
-CREATE VIEW pg_stat_subscription_stats AS
- SELECT
- ss.subid,
- s.subname,
- ss.apply_error_count,
- ss.sync_error_count,
- ss.stats_reset
- FROM pg_subscription as s,
- pg_stat_get_subscription_stats(s.oid) as ss;
->>>>>>> REL_16_9
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]