diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/postgres_fdw/deparse.c | 2 | ||||
-rw-r--r-- | contrib/postgres_fdw/postgres_fdw.c | 2 | ||||
-rw-r--r-- | contrib/sepgsql/dml.c | 5 |
3 files changed, 3 insertions, 6 deletions
diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c index 32c7261dae5..f4b38c65aca 100644 --- a/contrib/postgres_fdw/deparse.c +++ b/contrib/postgres_fdw/deparse.c @@ -2176,7 +2176,7 @@ deparseColumnRef(StringInfo buf, int varno, int varattno, PlannerInfo *root, * FDW option, use attribute name. */ if (colname == NULL) - colname = get_relid_attribute_name(rte->relid, varattno); + colname = get_attname(rte->relid, varattno, false); if (qualify_col) ADD_REL_QUALIFIER(buf, varno); diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index c1d7f8032e5..d37180ae10b 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -5545,7 +5545,7 @@ conversion_error_callback(void *arg) if (var->varattno == 0) is_wholerow = true; else - attname = get_relid_attribute_name(rte->relid, var->varattno); + attname = get_attname(rte->relid, var->varattno, false); relname = get_rel_name(rte->relid); } diff --git a/contrib/sepgsql/dml.c b/contrib/sepgsql/dml.c index 36cdb27a768..c1fa320eb4b 100644 --- a/contrib/sepgsql/dml.c +++ b/contrib/sepgsql/dml.c @@ -118,10 +118,7 @@ fixup_inherited_columns(Oid parentId, Oid childId, Bitmapset *columns) continue; } - attname = get_attname(parentId, attno); - if (!attname) - elog(ERROR, "cache lookup failed for attribute %d of relation %u", - attno, parentId); + attname = get_attname(parentId, attno, false); attno = get_attnum(childId, attname); if (attno == InvalidAttrNumber) elog(ERROR, "cache lookup failed for attribute %s of relation %u", |