Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions contrib/amcheck/verify_heapam.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,11 @@ sanity_check_relation(Relation rel)
{
if (rel->rd_rel->relkind != RELKIND_RELATION &&
rel->rd_rel->relkind != RELKIND_MATVIEW &&
rel->rd_rel->relkind != RELKIND_TOASTVALUE)
rel->rd_rel->relkind != RELKIND_TOASTVALUE &&
rel->rd_rel->relkind != RELKIND_DIRECTORY_TABLE)
ereport(ERROR,
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
errmsg("\"%s\" is not a table, materialized view, or TOAST table",
errmsg("\"%s\" is not a table, directory table, materialized view, or TOAST table",
RelationGetRelationName(rel))));
if (rel->rd_rel->relam != HEAP_TABLE_AM_OID)
ereport(ERROR,
Expand Down
3 changes: 2 additions & 1 deletion contrib/oid2name/oid2name.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ sql_exec_dumpalltables(PGconn *conn, struct options *opts)
" LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace "
" LEFT JOIN pg_catalog.pg_database d ON d.datname = pg_catalog.current_database(),"
" pg_catalog.pg_tablespace t "
"WHERE relkind IN (" CppAsString2(RELKIND_RELATION) ","
"WHERE relkind IN (" CppAsString2(RELKIND_RELATION) "," CppAsString2(RELKIND_DIRECTORY_TABLE) ","
CppAsString2(RELKIND_MATVIEW) "%s%s) AND "
" %s"
" t.oid = CASE"
Expand Down Expand Up @@ -553,6 +553,7 @@ sql_exec_searchtables(PGconn *conn, struct options *opts)
CppAsString2(RELKIND_MATVIEW) ","
CppAsString2(RELKIND_INDEX) ","
CppAsString2(RELKIND_SEQUENCE) ","
CppAsString2(RELKIND_DIRECTORY_TABLE) ","
CppAsString2(RELKIND_TOASTVALUE) ") AND\n"
" t.oid = CASE\n"
" WHEN reltablespace <> 0 THEN reltablespace\n"
Expand Down
3 changes: 2 additions & 1 deletion contrib/pg_surgery/heap_surgery.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,8 @@ sanity_check_relation(Relation rel)
{
if (rel->rd_rel->relkind != RELKIND_RELATION &&
rel->rd_rel->relkind != RELKIND_MATVIEW &&
rel->rd_rel->relkind != RELKIND_TOASTVALUE)
rel->rd_rel->relkind != RELKIND_TOASTVALUE &&
rel->rd_rel->relkind != RELKIND_DIRECTORY_TABLE)
ereport(ERROR,
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
errmsg("\"%s\" is not a table, materialized view, or TOAST table",
Expand Down
3 changes: 2 additions & 1 deletion contrib/pg_visibility/pg_visibility.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,8 @@ check_relation_relkind(Relation rel)
{
if (rel->rd_rel->relkind != RELKIND_RELATION &&
rel->rd_rel->relkind != RELKIND_MATVIEW &&
rel->rd_rel->relkind != RELKIND_TOASTVALUE)
rel->rd_rel->relkind != RELKIND_TOASTVALUE &&
rel->rd_rel->relkind != RELKIND_DIRECTORY_TABLE)
ereport(ERROR,
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
errmsg("\"%s\" is not a table, materialized view, or TOAST table",
Expand Down
5 changes: 3 additions & 2 deletions contrib/pgstattuple/pgstatapprox.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,11 @@ pgstattuple_approx_internal(Oid relid, FunctionCallInfo fcinfo)
rel->rd_rel->relkind == RELKIND_AOBLOCKDIR ||
rel->rd_rel->relkind == RELKIND_AOVISIMAP ||
rel->rd_rel->relkind == RELKIND_MATVIEW ||
rel->rd_rel->relkind == RELKIND_TOASTVALUE))
rel->rd_rel->relkind == RELKIND_TOASTVALUE ||
rel->rd_rel->relkind == RELKIND_DIRECTORY_TABLE))
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("\"%s\" is not a table, materialized view, or TOAST table",
errmsg("\"%s\" is not a table, directory table, materialized view, or TOAST table",
RelationGetRelationName(rel))));

if (rel->rd_rel->relam != HEAP_TABLE_AM_OID)
Expand Down
5 changes: 3 additions & 2 deletions contrib/pgstattuple/pgstatindex.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,9 +766,10 @@ check_relation_relkind(Relation rel)
rel->rd_rel->relkind != RELKIND_INDEX &&
rel->rd_rel->relkind != RELKIND_MATVIEW &&
rel->rd_rel->relkind != RELKIND_SEQUENCE &&
rel->rd_rel->relkind != RELKIND_TOASTVALUE)
rel->rd_rel->relkind != RELKIND_TOASTVALUE &&
rel->rd_rel->relkind != RELKIND_DIRECTORY_TABLE)
ereport(ERROR,
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
errmsg("\"%s\" is not a table, index, materialized view, sequence, or TOAST table",
errmsg("\"%s\" is not a table, directory table, index, materialized view, sequence, or TOAST table",
RelationGetRelationName(rel))));
}
1 change: 1 addition & 0 deletions contrib/pgstattuple/pgstattuple.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ pgstat_relation(Relation rel, FunctionCallInfo fcinfo)
case RELKIND_AOSEGMENTS:
case RELKIND_AOBLOCKDIR:
case RELKIND_AOVISIMAP:
case RELKIND_DIRECTORY_TABLE:
return pgstat_heap(rel, fcinfo);
case RELKIND_INDEX:
switch (rel->rd_rel->relam)
Expand Down
1 change: 1 addition & 0 deletions contrib/postgres_fdw/postgres_fdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -5368,6 +5368,7 @@ postgresImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid)
CppAsString2(RELKIND_VIEW) ","
CppAsString2(RELKIND_FOREIGN_TABLE) ","
CppAsString2(RELKIND_MATVIEW) ","
CppAsString2(RELKIND_DIRECTORY_TABLE) ","
CppAsString2(RELKIND_PARTITIONED_TABLE) ") "
" AND n.nspname = ");
deparseStringLiteral(&buf, stmt->remote_schema);
Expand Down
1 change: 1 addition & 0 deletions gpMgmt/bin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ endif

SUBDIRS = stream gpcheckcat_modules gpconfig_modules gpssh_modules gppylib lib
SUBDIRS += ifaddrs
SUBDIRS += cbload

$(recurse)

Expand Down
25 changes: 25 additions & 0 deletions gpMgmt/bin/cbload/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
subdir = gpMgmt/bin/cbload
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global

.DEFAULT_GOAL := all

export GOPROXY ?= https://proxy.golang.org

all: build

build :
go mod download
go build -o cbload github.com/cloudberrydb/cbload

clean :
rm -f cbload

install: all
$(INSTALL_PROGRAM) 'cbload' $(bindir)

uninstall:
rm -f $(bindir)/cbload

distclean:
rm -f cbload
25 changes: 25 additions & 0 deletions gpMgmt/bin/cbload/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module github.com/cloudberrydb/cbload

go 1.19

require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.14.1 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.2 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/mattn/go-colorable v0.1.1 // indirect
github.com/mattn/go-isatty v0.0.7 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/x-cray/logrus-prefixed-formatter v0.5.2 // indirect
golang.org/x/crypto v0.6.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/text v0.7.0 // indirect
)
Loading