MCPcopy Create free account
hub / github.com/apache/cloudberry / check_ext_options

Function check_ext_options

contrib/extprotocol/gpextprotocol.c:52–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50} extprotocol_t;
51
52static 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.

Callers 1

demoprot_importFunction · 0.85

Calls 4

GetExtTableEntryFunction · 0.85
defGetStringFunction · 0.85
foreachFunction · 0.50
errmsgFunction · 0.50

Tested by

no test coverage detected