97 for (
i = 0;
i < n;
i++)
108 if (
inatt->attisdropped)
118 errdetail(
"Returned type %s does not match expected type %s in column \"%s\" (position %d).",
147 errdetail(
"Number of returned columns (%d) does not match "
148 "expected column count (%d).",
201 atttypmod =
outatt->atttypmod;
223 if (
inatt->attisdropped)
231 errmsg(
"could not convert row type"),
232 errdetail(
"Attribute \"%s\" of type %s does not match corresponding attribute of type %s.",
240 if (attrMap->
attnums[
i] == 0 && !missing_ok)
243 errmsg(
"could not convert row type"),
244 errdetail(
"Attribute \"%s\" of type %s does not exist in type %s.",
306 if (
inatt->atthasmissing)
320 inatt->attisdropped &&
void free_attrmap(AttrMap *map)
AttrMap * make_attrmap(int maplen)
AttrMap * build_attrmap_by_name(TupleDesc indesc, TupleDesc outdesc, bool missing_ok)
AttrMap * build_attrmap_by_name_if_req(TupleDesc indesc, TupleDesc outdesc, bool missing_ok)
static bool check_attrmap_match(TupleDesc indesc, TupleDesc outdesc, AttrMap *attrMap)
AttrMap * build_attrmap_by_position(TupleDesc indesc, TupleDesc outdesc, const char *msg)
int errmsg_internal(const char *fmt,...)
int errdetail(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define palloc0_array(type, count)
#define palloc0_object(type)
void pfree(void *pointer)
FormData_pg_attribute * Form_pg_attribute
static FormData_pg_attribute * TupleDescAttr(TupleDesc tupdesc, int i)
static CompactAttribute * TupleDescCompactAttr(TupleDesc tupdesc, int i)