Skip to content

Commit 276ae57

Browse files
committed
Add contraints for FDW tables
1 parent 6247aff commit 276ae57

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

contrib/postgres_fdw/connection.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
#include "utils/hsearch.h"
2323
#include "utils/memutils.h"
2424

25-
#undef DEBUG3
26-
#define DEBUG3 WARNING
27-
2825
/*
2926
* Connection cache hash table entry
3027
*

contrib/postgres_fdw/tests/dtmbench.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ void initializeDatabase()
160160
int accountsPerShard = (cfg.nAccounts + cfg.nShards - 1)/cfg.nShards;
161161
for (int i = 0; i < cfg.nShards; i++)
162162
{
163-
exec(txn, "insert into t_fdw%i (select generate_series(0,%d), %d)", i+1, accountsPerShard*i, accountsPerShard-1, 0);
163+
exec(txn, "alter table t_fdw%i add check (u between %d and %d)", i+1, accountsPerShard*i, accountsPerShard-1);
164+
exec(txn, "insert into t_fdw%i (select generate_series(%d,%d), %d)", i+1, accountsPerShard*i, accountsPerShard-1, 0);
164165
}
165166
txn.commit();
166167
}

contrib/postgres_fdw/tests/makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CXX=g++
2-
CXXFLAGS=-g -Wall -O0 -pthread
2+
CXXFLAGS=-g -Wall -O2 -pthread
33

44
all: dtmbench
55

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy