diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2018-02-12 19:30:30 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2018-02-12 19:33:15 -0300 |
commit | 8237f27b504ff1d1e2da7ae4c81a7f72ea0e0e3e (patch) | |
tree | dd4faedb7b7d92e6c1f0ea7fade2eac487ccbc1c /contrib/sepgsql/dml.c | |
parent | 88ef48c1ccee6a2200e01318180cf521413b3012 (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/sepgsql/dml.c')
-rw-r--r-- | contrib/sepgsql/dml.c | 5 |
1 files changed, 1 insertions, 4 deletions
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", |