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

Commit4a46a99

Browse files
committed
postgres_fdw: make_tuple_from_result_row should set cur_attno for ctid.
There's no reason for this function to do this for every otherattribute number and omit it for CTID, especially sinceconversion_error_callback has code to handle that case. This seemsto be an oversight in commite690b95.Etsuro Fujita
1 parent2a90cb6 commit4a46a99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎contrib/postgres_fdw/postgres_fdw.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3803,18 +3803,17 @@ make_tuple_from_result_row(PGresult *res,
38033803
valstr=PQgetvalue(res,row,j);
38043804

38053805
/* convert value to internal representation */
3806+
errpos.cur_attno=i;
38063807
if (i>0)
38073808
{
38083809
/* ordinary column */
38093810
Assert(i <=tupdesc->natts);
38103811
nulls[i-1]= (valstr==NULL);
38113812
/* Apply the input function even to nulls, to support domains */
3812-
errpos.cur_attno=i;
38133813
values[i-1]=InputFunctionCall(&attinmeta->attinfuncs[i-1],
38143814
valstr,
38153815
attinmeta->attioparams[i-1],
38163816
attinmeta->atttypmods[i-1]);
3817-
errpos.cur_attno=0;
38183817
}
38193818
elseif (i==SelfItemPointerAttributeNumber)
38203819
{
@@ -3827,6 +3826,7 @@ make_tuple_from_result_row(PGresult *res,
38273826
ctid= (ItemPointer)DatumGetPointer(datum);
38283827
}
38293828
}
3829+
errpos.cur_attno=0;
38303830

38313831
j++;
38323832
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp