Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f43001 commit 663bee0Copy full SHA for 663bee0
src/backend/foreign/foreign.c
@@ -371,8 +371,17 @@ deflist_to_tuplestore(ReturnSetInfo *rsinfo, List *options)
371
DefElem *def = lfirst(cell);
372
373
values[0] = CStringGetTextDatum(def->defname);
374
- values[1] = CStringGetTextDatum(((Value *) def->arg)->val.str);
375
- nulls[0] = nulls[1] = false;
+ nulls[0] = false;
+ if (def->arg)
376
+ {
377
+ values[1] = CStringGetTextDatum(((Value *) (def->arg))->val.str);
378
+ nulls[1] = false;
379
+ }
380
+ else
381
382
+ values[1] = (Datum) 0;
383
+ nulls[1] = true;
384
385
tuplestore_putvalues(tupstore, tupdesc, values, nulls);
386
}
387
0 commit comments