Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6693c9a

Browse files
committed
deflist_to_tuplestore dumped core on an option with no value.
Make it return NULL for the option_value, instead.Per report from Frank van Vugt. Back-patch to 8.4 where this code wasadded.
1 parent3f33044 commit6693c9a

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

‎src/backend/foreign/foreign.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,17 @@ deflist_to_tuplestore(ReturnSetInfo *rsinfo, List *options)
363363
DefElem*def=lfirst(cell);
364364

365365
values[0]=CStringGetTextDatum(def->defname);
366-
values[1]=CStringGetTextDatum(((Value*)def->arg)->val.str);
367-
nulls[0]=nulls[1]= false;
366+
nulls[0]= false;
367+
if (def->arg)
368+
{
369+
values[1]=CStringGetTextDatum(((Value*) (def->arg))->val.str);
370+
nulls[1]= false;
371+
}
372+
else
373+
{
374+
values[1]= (Datum)0;
375+
nulls[1]= true;
376+
}
368377
tuplestore_putvalues(tupstore,tupdesc,values,nulls);
369378
}
370379

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp