You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(28) |
Jun
(12) |
Jul
(11) |
Aug
(12) |
Sep
(5) |
Oct
(19) |
Nov
(14) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(18) |
Feb
(30) |
Mar
(115) |
Apr
(89) |
May
(50) |
Jun
(44) |
Jul
(22) |
Aug
(13) |
Sep
(11) |
Oct
(30) |
Nov
(28) |
Dec
(39) |
2012 |
Jan
(38) |
Feb
(18) |
Mar
(43) |
Apr
(91) |
May
(108) |
Jun
(46) |
Jul
(37) |
Aug
(44) |
Sep
(33) |
Oct
(29) |
Nov
(36) |
Dec
(15) |
2013 |
Jan
(35) |
Feb
(611) |
Mar
(5) |
Apr
(55) |
May
(30) |
Jun
(28) |
Jul
(458) |
Aug
(34) |
Sep
(9) |
Oct
(39) |
Nov
(22) |
Dec
(32) |
2014 |
Jan
(16) |
Feb
(16) |
Mar
(42) |
Apr
(179) |
May
(7) |
Jun
(6) |
Jul
(9) |
Aug
|
Sep
(4) |
Oct
|
Nov
(3) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
1
(3) |
2
(5) |
3
|
4
(4) |
5
|
6
|
7
(7) |
8
(10) |
9
(6) |
10
(5) |
11
(1) |
12
|
13
|
14
|
15
|
16
|
17
(4) |
18
(1) |
19
|
20
|
21
(5) |
22
(15) |
23
(18) |
24
(7) |
25
(4) |
26
|
27
|
28
(3) |
29
(2) |
30
(11) |
31
(4) |
|
|
From: Michael P. <mic...@us...> - 2011-03-11 05:45:57
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 2f96f59952551d1644c3176e5a23483308e9c810 (commit) from 861f5131ddadd10fcd88f3653862601cddf0b255 (commit) - Log ----------------------------------------------------------------- commit 2f96f59952551d1644c3176e5a23483308e9c810 Author: Michael P <mic...@us...> Date: Fri Mar 11 14:36:32 2011 +0900 Stabilize code for pg_regress tests This commits enables FOREIGN constraints and solves a couple of issues found with pg_regress tests when assertions are enabled. diff --git a/src/backend/optimizer/plan/subselect.c b/src/backend/optimizer/plan/subselect.c index bdb026d..a3956ae 100644 --- a/src/backend/optimizer/plan/subselect.c +++ b/src/backend/optimizer/plan/subselect.c @@ -32,7 +32,9 @@ #include "utils/builtins.h" #include "utils/lsyscache.h" #include "utils/syscache.h" - +#ifdef PGXC +#include "pgxc/pgxc.h" +#endif typedef struct convert_testexpr_context { @@ -342,6 +344,11 @@ make_subplan(PlannerInfo *root, Query *orig_subquery, SubLinkType subLinkType, result = build_subplan(root, plan, subroot->parse->rtable, subroot->rowMarks, subLinkType, testexpr, true, isTopQual); +#ifdef PGXC + /* This is not necessary for a PGXC Coordinator, we just need one plan */ + if (IS_PGXC_COORDINATOR && !IsConnFromCoord()) + return result; +#endif /* * If it's a correlated EXISTS with an unimportant targetlist, we might be diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index 3ffc570..0ed66ed 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -1595,12 +1595,6 @@ transformFKConstraints(ParseState *pstate, CreateStmtContext *cxt, constraint->skip_validation = true; #ifdef PGXC - if (constraint->contype == CONSTR_FOREIGN) - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("Postgres-XC does not support FOREIGN constraints yet"), - errdetail("The feature is not currently supported"))); - /* * Set fallback distribution column. * If not yet set, set it to first column in FK constraint @@ -1611,7 +1605,8 @@ transformFKConstraints(ParseState *pstate, CreateStmtContext *cxt, Oid pk_rel_id = RangeVarGetRelid(constraint->pktable, false); /* make sure it is a partitioned column */ - if (IsHashColumnForRelId(pk_rel_id, strVal(list_nth(constraint->pk_attrs,0)))) + if (list_length(constraint->pk_attrs) != 0 + && IsHashColumnForRelId(pk_rel_id, strVal(list_nth(constraint->pk_attrs,0)))) { /* take first column */ char *colstr = strdup(strVal(list_nth(constraint->fk_attrs,0))); @@ -2147,12 +2142,6 @@ transformAlterTableStmt(AlterTableStmt *stmt, const char *queryString) if (((Constraint *) cmd->def)->contype == CONSTR_FOREIGN) { skipValidation = false; -#ifdef PGXC - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("Postgres-XC does not support FOREIGN constraints yet"), - errdetail("The feature is not currently supported"))); -#endif } } else @@ -2557,8 +2546,8 @@ CheckLocalIndexColumn (char loctype, char *partcolname, char *indexcolname) * check to see if the constraint can be enforced locally * if not, an error will be thrown */ -void -static checkLocalFKConstraints(CreateStmtContext *cxt) +static void +checkLocalFKConstraints(CreateStmtContext *cxt) { ListCell *fkclist; @@ -2621,7 +2610,7 @@ static checkLocalFKConstraints(CreateStmtContext *cxt) { char *attrname = (char *) strVal(lfirst(attritem)); - if (strcmp(cxt->rel->rd_locator_info->partAttrName, attrname) == 0) + if (strcmp(checkcolname, attrname) == 0) { /* Found the ordinal position in constraint */ break; @@ -2631,14 +2620,20 @@ static checkLocalFKConstraints(CreateStmtContext *cxt) if (pos >= list_length(fkconstraint->fk_attrs)) ereport(ERROR, - (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("Hash/Modulo distributed table must include distribution column in index"))); + (errcode(ERRCODE_SYNTAX_ERROR), + errmsg("Hash/Modulo distributed table must include distribution column in index"))); + + /* Manage the error when the list of new constraints is empty */ + if (!fkconstraint->pk_attrs) + ereport(ERROR, + (errcode(ERRCODE_SYNTAX_ERROR), + errmsg("Hash/Modulo distribution column list of attributes is empty"))); /* Verify that the referenced table is partitioned at the same position in the index */ if (!IsDistColumnForRelId(pk_rel_id, strVal(list_nth(fkconstraint->pk_attrs,pos)))) ereport(ERROR, - (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("Hash/Modulo distribution column does not refer to hash/modulo distribution column in referenced table."))); + (errcode(ERRCODE_SYNTAX_ERROR), + errmsg("Hash/Modulo distribution column does not refer to hash/modulo distribution column in referenced table."))); } } } ----------------------------------------------------------------------- Summary of changes: src/backend/optimizer/plan/subselect.c | 9 +++++++- src/backend/parser/parse_utilcmd.c | 35 +++++++++++++------------------ 2 files changed, 23 insertions(+), 21 deletions(-) hooks/post-receive -- Postgres-XC |