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

Commit902d1cb

Browse files
committed
Remove all uses of the deprecated functions heap_formtuple, heap_modifytuple,
and heap_deformtuple in favor of the newer functions heap_form_tuple et al(which do the same things but use bool control flags instead of arbitrarychar values). Eliminate the former duplicate coding of these functions,reducing the deprecated functions to mere wrappers around the newer ones.We can't get rid of them entirely because add-on modules probably stillcontain many instances of the old coding style.Kris Jurka
1 parent492059d commit902d1cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+631
-1014
lines changed

‎contrib/hstore/hstore_op.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ each(PG_FUNCTION_ARGS)
610610
HEntry*ptr=&(ARRPTR(st->hs)[st->i]);
611611
Datumres,
612612
dvalues[2];
613-
charnulls[]= {' ',' '};
613+
boolnulls[2]= {false, false};
614614
text*item;
615615
HeapTupletuple;
616616

@@ -620,7 +620,7 @@ each(PG_FUNCTION_ARGS)
620620
if (ptr->valisnull)
621621
{
622622
dvalues[1]= (Datum)0;
623-
nulls[1]='n';
623+
nulls[1]=true;
624624
}
625625
else
626626
{
@@ -630,11 +630,11 @@ each(PG_FUNCTION_ARGS)
630630
}
631631
st->i++;
632632

633-
tuple=heap_formtuple(funcctx->attinmeta->tupdesc,dvalues,nulls);
633+
tuple=heap_form_tuple(funcctx->attinmeta->tupdesc,dvalues,nulls);
634634
res=HeapTupleGetDatum(tuple);
635635

636636
pfree(DatumGetPointer(dvalues[0]));
637-
if (nulls[1]!='n')
637+
if (!nulls[1])
638638
pfree(DatumGetPointer(dvalues[1]));
639639

640640
SRF_RETURN_NEXT(funcctx,PointerGetDatum(res));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp