1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

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.
This commit is contained in:
Peter Eisentraut
2009-02-24 10:06:36 +00:00
parent f73bed308a
commit 7babccb915
28 changed files with 452 additions and 626 deletions

View File

@ -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;

View File

@ -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;