Skip to content

Commit 4a46a99

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 other attribute number and omit it for CTID, especially since conversion_error_callback has code to handle that case. This seems to be an oversight in commit e690b95. Etsuro Fujita
1 parent 2a90cb6 commit 4a46a99

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
else if (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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy