From 9d299a492454f9ffdf0fd8fe1fd6303c8ddf805a Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 27 Sep 2020 22:30:44 -0400 Subject: Minor mop-up for List improvements. Fix a few places that were using written-out versions of the pg_list.h macros that commit cc99baa43 just improved, making them also use those macros so as to gain whatever performance improvement is to be had. Discussion: https://postgr.es/m/CAApHDvpo1zj9KhEpU2cCRZfSM3Q6XGdhzuAS2v79PH7WJBkYVA@mail.gmail.com --- src/backend/commands/sequence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/commands/sequence.c') diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c index 6aab73bfd44..632b34af610 100644 --- a/src/backend/commands/sequence.c +++ b/src/backend/commands/sequence.c @@ -1668,7 +1668,7 @@ process_owned_by(Relation seqrel, List *owned_by, bool for_identity) /* Separate relname and attr name */ relname = list_truncate(list_copy(owned_by), nnames - 1); - attrname = strVal(lfirst(list_tail(owned_by))); + attrname = strVal(llast(owned_by)); /* Open and lock rel to ensure it won't go away meanwhile */ rel = makeRangeVarFromNameList(relname); -- cgit v1.2.3