aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_utilcmd.c
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 /src/backend/parser/parse_utilcmd.c
parent88ef48c1ccee6a2200e01318180cf521413b3012 (diff)
downloadpostgresql-8237f27b504ff1d1e2da7ae4c81a7f72ea0e0e3e.tar.gz
postgresql-8237f27b504ff1d1e2da7ae4c81a7f72ea0e0e3e.zip
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 'src/backend/parser/parse_utilcmd.c')
-rw-r--r--src/backend/parser/parse_utilcmd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index d415d7180f2..7c2cd4656ad 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -1470,7 +1470,7 @@ generateClonedIndexStmt(RangeVar *heapRel, Oid heapRelid, Relation source_idx,
/* Simple index column */
char *attname;
- attname = get_relid_attribute_name(indrelid, attnum);
+ attname = get_attname(indrelid, attnum, false);
keycoltype = get_atttype(indrelid, attnum);
iparam->name = attname;
@@ -3406,8 +3406,8 @@ transformPartitionBound(ParseState *pstate, Relation parent,
/* Get the only column's name in case we need to output an error */
if (key->partattrs[0] != 0)
- colname = get_relid_attribute_name(RelationGetRelid(parent),
- key->partattrs[0]);
+ colname = get_attname(RelationGetRelid(parent),
+ key->partattrs[0], false);
else
colname = deparse_expression((Node *) linitial(partexprs),
deparse_context_for(RelationGetRelationName(parent),
@@ -3491,8 +3491,8 @@ transformPartitionBound(ParseState *pstate, Relation parent,
/* Get the column's name in case we need to output an error */
if (key->partattrs[i] != 0)
- colname = get_relid_attribute_name(RelationGetRelid(parent),
- key->partattrs[i]);
+ colname = get_attname(RelationGetRelid(parent),
+ key->partattrs[i], false);
else
{
colname = deparse_expression((Node *) list_nth(partexprs, j),