From 7babccb91504fd4a958ff778547af1a8cbc1f8f2 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 24 Feb 2009 10:06:36 +0000 Subject: Add the possibility to specify an explicit validator function for foreign-data wrappers (similar to procedural languages). This way we don't need to retain the nearly empty libraries, and we are more free in how to implement the wrapper API in the future. --- src/backend/nodes/copyfuncs.c | 7 ++++--- src/backend/nodes/equalfuncs.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src/backend/nodes') diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index bc4232bdc8b..2175e0c0fc0 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -15,7 +15,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.423 2009/02/06 23:43:23 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.424 2009/02/24 10:06:32 petere Exp $ * *------------------------------------------------------------------------- */ @@ -2994,7 +2994,7 @@ _copyCreateFdwStmt(CreateFdwStmt *from) CreateFdwStmt *newnode = makeNode(CreateFdwStmt); COPY_STRING_FIELD(fdwname); - COPY_STRING_FIELD(library); + COPY_NODE_FIELD(validator); COPY_NODE_FIELD(options); return newnode; @@ -3006,7 +3006,8 @@ _copyAlterFdwStmt(AlterFdwStmt *from) AlterFdwStmt *newnode = makeNode(AlterFdwStmt); COPY_STRING_FIELD(fdwname); - COPY_STRING_FIELD(library); + COPY_NODE_FIELD(validator); + COPY_SCALAR_FIELD(change_validator); COPY_NODE_FIELD(options); return newnode; diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index 2b8b542e749..4d905dc945e 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -22,7 +22,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.347 2009/02/02 19:31:39 alvherre Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.348 2009/02/24 10:06:32 petere Exp $ * *------------------------------------------------------------------------- */ @@ -1548,7 +1548,7 @@ static bool _equalCreateFdwStmt(CreateFdwStmt *a, CreateFdwStmt *b) { COMPARE_STRING_FIELD(fdwname); - COMPARE_STRING_FIELD(library); + COMPARE_NODE_FIELD(validator); COMPARE_NODE_FIELD(options); return true; @@ -1558,7 +1558,8 @@ static bool _equalAlterFdwStmt(AlterFdwStmt *a, AlterFdwStmt *b) { COMPARE_STRING_FIELD(fdwname); - COMPARE_STRING_FIELD(library); + COMPARE_NODE_FIELD(validator); + COMPARE_SCALAR_FIELD(change_validator); COMPARE_NODE_FIELD(options); return true; -- cgit v1.2.3