File: plpython.c
Function: PLyDict_FromTuple
Error: calling PyDict_SetItemString with NULL as argument 3 (value) at plpython.c:2404
2371 static PyObject *
2372 PLyDict_FromTuple(PLyTypeInfo *info, HeapTuple tuple, TupleDesc desc)
2373 {
2374 	PyObject   *volatile dict;
2375 	int			i;
2376 
2377 	if (info->is_rowtype != 1)
when treating unknown struct PLyTypeInfo * from plpython.c:2372 as non-NULL
when considering range: -0x80000000 <= value <= 0
taking True path
2378 		elog(ERROR, "PLyTypeInfo structure describes a datum");
2379 
2380 	dict = PyDict_New();
when PyDict_New() succeeds
2381 	if (dict == NULL)
taking False path
2382 		PLy_elog(ERROR, "could not create new dictionary");
2383 
2384 	PG_TRY();
when considering value == (int)0 from plpython.c:2384
taking True path
2385 	{
2386 		for (i = 0; i < info->in.r.natts; i++)
when considering range: 1 <= value <= 0x7fffffff
taking True path
2387 		{
2388 			char	   *key;
2389 			Datum		vattr;
2390 			bool		is_null;
2391 			PyObject   *value;
2392 
2393 			if (desc->attrs[i]->attisdropped)
when treating unknown struct tupleDesc * from plpython.c:2372 as non-NULL
when treating unknown struct FormData_pg_attribute * * from plpython.c:2393 as non-NULL
when treating unknown struct FormData_pg_attribute * from plpython.c:2393 as non-NULL
when considering value == (bool)0 from plpython.c:2393
taking False path
2394 				continue;
2395 
2396 			key = NameStr(desc->attrs[i]->attname);
when treating unknown struct FormData_pg_attribute * * from plpython.c:2396 as non-NULL
when treating unknown struct FormData_pg_attribute * from plpython.c:2396 as non-NULL
2397 			vattr = heap_getattr(tuple, (i + 1), desc, &is_null);
taking True path
when treating unknown struct HeapTupleData * from plpython.c:2372 as non-NULL
when treating unknown struct HeapTupleHeaderData * from plpython.c:2397 as non-NULL
when considering range: 1 <= value <= 2047
taking False path
when treating unknown struct HeapTupleHeaderData * from plpython.c:2397 as non-NULL
when considering value == (int)0 from plpython.c:2397
taking True path
when treating unknown struct FormData_pg_attribute * * from plpython.c:2397 as non-NULL
when treating unknown struct FormData_pg_attribute * from plpython.c:2397 as non-NULL
when considering range: -0x80000000 <= value <= -1
taking False path
2398 
2399 			if (is_null || info->in.r.atts[i].func == NULL)
taking False path
when treating unknown struct PLyDatumToOb * from plpython.c:2399 as non-NULL
when treating unknown struct PyObject * (*PLyDatumToObFunc) (struct PLyDatumToOb *, Datum) from plpython.c:2399 as non-NULL
taking False path
2400 				PyDict_SetItemString(dict, key, Py_None);
2401 			else
2402 			{
2403 				value = (info->in.r.atts[i].func) (&info->in.r.atts[i], vattr);
when treating unknown struct PLyDatumToOb * from plpython.c:2403 as non-NULL
when call fails
2404 				PyDict_SetItemString(dict, key, value);
calling PyDict_SetItemString with NULL as argument 3 (value) at plpython.c:2404
2405 				Py_DECREF(value);
2406 			}
2407 		}
2408 	}
2409 	PG_CATCH();
2410 	{
2411 		Py_DECREF(dict);
2412 		PG_RE_THROW();
2413 	}
2414 	PG_END_TRY();
2415 
2416 	return dict;
2417 }