| 50 | } extprotocol_t; |
| 51 | |
| 52 | static void check_ext_options(const FunctionCallInfo fcinfo) |
| 53 | { |
| 54 | ListCell *cell; |
| 55 | Relation rel = EXTPROTOCOL_GET_RELATION(fcinfo); |
| 56 | ExtTableEntry *exttbl = GetExtTableEntry(rel->rd_id); |
| 57 | List *options = exttbl->options; |
| 58 | |
| 59 | foreach(cell, options) { |
| 60 | DefElem *def = (DefElem *) lfirst(cell); |
| 61 | char *key = def->defname; |
| 62 | char *value = defGetString(def); |
| 63 | |
| 64 | if (key && strcasestr(key, "database") && !strcasestr(value, "cloudberry")) { |
| 65 | ereport(ERROR, errmsg("This is cloudberry.")); |
| 66 | } |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | /* |
| 71 | * Import data into GPDB. |
no test coverage detected