diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/catalog/catversion.h | 4 | ||||
| -rw-r--r-- | src/include/catalog/pg_foreign_data_wrapper.h | 6 | ||||
| -rw-r--r-- | src/include/catalog/pg_proc.h | 4 | ||||
| -rw-r--r-- | src/include/foreign/foreign.h | 28 | ||||
| -rw-r--r-- | src/include/nodes/parsenodes.h | 7 |
5 files changed, 14 insertions, 35 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index 08b2969d96..784ba68891 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -37,7 +37,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.523 2009/02/09 21:18:28 tgl Exp $ + * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.524 2009/02/24 10:06:34 petere Exp $ * *------------------------------------------------------------------------- */ @@ -53,6 +53,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 200902092 +#define CATALOG_VERSION_NO 200902242 #endif diff --git a/src/include/catalog/pg_foreign_data_wrapper.h b/src/include/catalog/pg_foreign_data_wrapper.h index c6d905ca1b..bb7e903db3 100644 --- a/src/include/catalog/pg_foreign_data_wrapper.h +++ b/src/include/catalog/pg_foreign_data_wrapper.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/pg_foreign_data_wrapper.h,v 1.2 2009/01/01 17:23:57 momjian Exp $ + * $PostgreSQL: pgsql/src/include/catalog/pg_foreign_data_wrapper.h,v 1.3 2009/02/24 10:06:34 petere Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -32,10 +32,10 @@ CATALOG(pg_foreign_data_wrapper,2328) { NameData fdwname; /* foreign-data wrapper name */ Oid fdwowner; /* FDW owner */ + Oid fdwvalidator; /* optional validation function */ /* VARIABLE LENGTH FIELDS start here. */ - text fdwlibrary; /* FDW shared library location */ aclitem fdwacl[1]; /* access permissions */ text fdwoptions[1]; /* FDW options */ } FormData_pg_foreign_data_wrapper; @@ -55,7 +55,7 @@ typedef FormData_pg_foreign_data_wrapper *Form_pg_foreign_data_wrapper; #define Natts_pg_foreign_data_wrapper 5 #define Anum_pg_foreign_data_wrapper_fdwname 1 #define Anum_pg_foreign_data_wrapper_fdwowner 2 -#define Anum_pg_foreign_data_wrapper_fdwlibrary 3 +#define Anum_pg_foreign_data_wrapper_fdwvalidator 3 #define Anum_pg_foreign_data_wrapper_fdwacl 4 #define Anum_pg_foreign_data_wrapper_fdwoptions 5 diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index d657e9826c..b0c5be4323 100644 --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.536 2009/02/06 21:15:11 tgl Exp $ + * $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.537 2009/02/24 10:06:34 petere Exp $ * * NOTES * The script catalog/genbki.sh reads this file and generates .bki @@ -3682,6 +3682,8 @@ DESCR("total disk space usage for the specified table and associated indexes and DATA(insert OID = 2288 ( pg_size_pretty PGNSP PGUID 12 1 0 0 f f f t f v 1 0 25 "20" _null_ _null_ _null_ _null_ pg_size_pretty _null_ _null_ _null_ )); DESCR("convert a long int to a human readable text using size units"); +DATA(insert OID = 2316 ( postgresql_fdw_validator PGNSP PGUID 12 1 0 0 f f f t f i 2 0 16 "1009 26" _null_ _null_ _null_ _null_ postgresql_fdw_validator _null_ _null_ _null_)); + DATA(insert OID = 2290 ( record_in PGNSP PGUID 12 1 0 0 f f f t f v 3 0 2249 "2275 26 23" _null_ _null_ _null_ _null_ record_in _null_ _null_ _null_ )); DESCR("I/O"); DATA(insert OID = 2291 ( record_out PGNSP PGUID 12 1 0 0 f f f t f v 1 0 2275 "2249" _null_ _null_ _null_ _null_ record_out _null_ _null_ _null_ )); diff --git a/src/include/foreign/foreign.h b/src/include/foreign/foreign.h index 5792903aa4..dc5d2af87d 100644 --- a/src/include/foreign/foreign.h +++ b/src/include/foreign/foreign.h @@ -6,7 +6,7 @@ * * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/include/foreign/foreign.h,v 1.2 2009/01/01 17:23:59 momjian Exp $ + * $PostgreSQL: pgsql/src/include/foreign/foreign.h,v 1.3 2009/02/24 10:06:35 petere Exp $ * *------------------------------------------------------------------------- */ @@ -33,17 +33,13 @@ typedef enum { FdwOpt = 4, /* options for FOREIGN DATA WRAPPER */ } GenericOptionFlags; -typedef struct ForeignDataWrapperLibrary ForeignDataWrapperLibrary; - typedef struct ForeignDataWrapper { Oid fdwid; /* FDW Oid */ Oid owner; /* FDW owner user Oid */ char *fdwname; /* Name of the FDW */ - char *fdwlibrary; /* Library name */ + Oid fdwvalidator; List *options; /* fdwoptions as DefElem list */ - - ForeignDataWrapperLibrary *lib; /* interface to the FDW functions */ } ForeignDataWrapper; typedef struct ForeignServer @@ -65,25 +61,6 @@ typedef struct UserMapping } UserMapping; -/* - * Foreign-data wrapper library function types. - */ -typedef void (*OptionListValidatorFunc)(ForeignDataWrapper *, - GenericOptionFlags, - List *); - -/* - * Interface functions to the foreign-data wrapper. This is decoupled - * from the FDW as there maybe several FDW-s accessing the same library. - */ -struct ForeignDataWrapperLibrary -{ - char *libname; /* name of the library file */ - - OptionListValidatorFunc validateOptionList; -}; - - extern ForeignServer *GetForeignServer(Oid serverid); extern ForeignServer *GetForeignServerByName(const char *name, bool missing_ok); extern Oid GetForeignServerOidByName(const char *name, bool missing_ok); @@ -92,7 +69,6 @@ extern ForeignDataWrapper *GetForeignDataWrapper(Oid fdwid); extern ForeignDataWrapper *GetForeignDataWrapperByName(const char *name, bool missing_ok); extern Oid GetForeignDataWrapperOidByName(const char *name, bool missing_ok); -extern ForeignDataWrapperLibrary *GetForeignDataWrapperLibrary(const char *libname); /* Foreign data wrapper interface functions */ extern void _pg_validateOptionList(ForeignDataWrapper *fdw, diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 23ffaabb4e..a7f1514f61 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -13,7 +13,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.391 2009/02/11 21:11:16 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.392 2009/02/24 10:06:35 petere Exp $ * *------------------------------------------------------------------------- */ @@ -1468,7 +1468,7 @@ typedef struct CreateFdwStmt { NodeTag type; char *fdwname; /* foreign-data wrapper name */ - char *library; /* libray name */ + List *validator; /* optional validator function (qual. name) */ List *options; /* generic options to FDW */ } CreateFdwStmt; @@ -1476,7 +1476,8 @@ typedef struct AlterFdwStmt { NodeTag type; char *fdwname; /* foreign-data wrapper name */ - char *library; /* libray name */ + List *validator; /* optional validator function (qual. name) */ + bool change_validator; List *options; /* generic options to FDW */ } AlterFdwStmt; |
