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
4 changes: 4 additions & 0 deletions src/common/comm_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,13 @@ typedef long long int int64; /* == 64 bits */
#define INT64_FORMAT "%lld"
typedef float float4;
typedef double float8;
#ifndef __bool_true_false_are_defined /* from <stdbool.h> */
#ifndef bool
typedef char bool;
#define true ((bool) 1)
#define false ((bool) 0)
#endif
#endif
/* End of extraction from c.h */

extern int is_write_log(int elevel, int log_min_level);
Expand Down
2 changes: 1 addition & 1 deletion src/containers.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ static void cleanup(const backendConnectionInfo *backend, const runtimeConnectio
/* Setting application name to let the system know it is us */
char psname[200];
snprintf(psname, sizeof(psname), "plcontainer cleaner %s", info->identity);
set_ps_display(psname, false);
set_ps_display(psname);

int res = 0;
int wait_times = 0;
Expand Down
4 changes: 1 addition & 3 deletions src/plcontainer.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,7 @@ _PG_init(void) {
static bool
PLy_procedure_is_trigger(Form_pg_proc procStruct)
{
return (procStruct->prorettype == TRIGGEROID ||
(procStruct->prorettype == OPAQUEOID &&
procStruct->pronargs == 0));
return (procStruct->prorettype == TRIGGEROID);
}

Datum
Expand Down
18 changes: 7 additions & 11 deletions tests/regress/expected/schema.out
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,20 @@ CREATE TABLE users (
username text,
userid serial
);
NOTICE: CREATE TABLE will create implicit sequence "users_userid_seq" for serial column "users.userid"
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'fname' as the Greenplum Database data distribution key for this table.
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'fname' as the Apache Cloudberry data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
CREATE TABLE taxonomy (
id serial,
name text
);
NOTICE: CREATE TABLE will create implicit sequence "taxonomy_id_seq" for serial column "taxonomy.id"
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'id' as the Greenplum Database data distribution key for this table.
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'id' as the Apache Cloudberry data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
CREATE TABLE entry (
accession text,
eid serial,
txid int2
);
NOTICE: CREATE TABLE will create implicit sequence "entry_eid_seq" for serial column "entry.eid"
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'accession' as the Greenplum Database data distribution key for this table.
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'accession' as the Apache Cloudberry data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
CREATE TABLE sequences (
eid int4,
Expand All @@ -67,25 +64,24 @@ CREATE TABLE sequences (
sequence text,
multipart bool default 'false'
);
NOTICE: CREATE TABLE will create implicit sequence "sequences_pid_seq" for serial column "sequences.pid"
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'eid' as the Greenplum Database data distribution key for this table.
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'eid' as the Apache Cloudberry data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
CREATE TABLE xsequences (
pid int4,
sequence text
);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'pid' as the Greenplum Database data distribution key for this table.
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'pid' as the Apache Cloudberry data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
CREATE TABLE unicode_test (
testvalue text
);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'testvalue' as the Greenplum Database data distribution key for this table.
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'testvalue' as the Apache Cloudberry data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
CREATE TABLE table_record (
first text,
second int4
);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'first' as the Greenplum Database data distribution key for this table.
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'first' as the Apache Cloudberry data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
-- Inserting some test data
INSERT INTO users (fname, lname, username) VALUES ('jane', 'doe', 'j_doe');
Expand Down
6 changes: 1 addition & 5 deletions tests/regress/expected/test_r_7.out
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,8 @@ WARNING: this is the warning message
(1 row)

\! psql -d ${PL_TESTDB} -c "select rlogging_fatal();"
FATAL: this is the fatal message
ERROR: this is the fatal message
CONTEXT: PLContainer function "rlogging_fatal"
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
connection to server was lost
select rsetofint4();
rsetofint4
------------
Expand Down
6 changes: 3 additions & 3 deletions tests/regress/expected/uda_r.out
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ CREATE AGGREGATE rsum_cols(numeric, numeric) (
INITCOND = 0
);
create table tr (i int, j int);
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Greenplum Database data distribution key for this table.
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Apache Cloudberry data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
insert into tr values(2,1),(4,8),(9,10),(10,24),(44,11);
select rsum_cols(i,j) FROM tr;
Expand All @@ -38,13 +38,13 @@ execute on any;
select * from public.test_spi_plcr2('select relname, relnatts from pg_class where oid= 1259') as t(relname name, relnatts integer);
relname | relnatts
----------+----------
pg_class | 30
pg_class | 36
(1 row)

select * from public.test_spi_plcr2('select relnamespace, relname, relnatts from pg_class where oid= 1259') as t(relnamespace text, relname name, relnatts integer);
relnamespace | relname | relnatts
--------------+----------+----------
11 | pg_class | 30
11 | pg_class | 36
(1 row)

drop function public.test_spi_plcr2(text);