summaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2018-02-12 19:30:30 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2018-02-12 19:33:15 -0300
commit8237f27b504ff1d1e2da7ae4c81a7f72ea0e0e3e (patch)
treedd4faedb7b7d92e6c1f0ea7fade2eac487ccbc1c /contrib/postgres_fdw
parent88ef48c1ccee6a2200e01318180cf521413b3012 (diff)
get_relid_attribute_name is dead, long live get_attname
The modern way is to use a missing_ok argument instead of two separate almost-identical routines, so do that. Author: Michaël Paquier Reviewed-by: Álvaro Herrera Discussion: https://postgr.es/m/20180201063212.GE6398@paquier.xyz
Diffstat (limited to 'contrib/postgres_fdw')
-rw-r--r--contrib/postgres_fdw/deparse.c2
-rw-r--r--contrib/postgres_fdw/postgres_fdw.c2
2 files changed, 2 insertions, 2 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);
}