mirror of
https://github.com/postgres/postgres.git
synced 2025-11-24 00:23:06 +03:00
Add 'missing_ok' argument to build_attrmap_by_name
When it's given as true, return a 0 in the position of the missing column rather than raising an error. This is currently unused, but it allows us to reimplement column permission checking in a subsequent commit. It seems worth breaking into a separate commit because it affects unrelated code. Author: Amit Langote <amitlangote09@gmail.com> Discussion: https://postgr.es/m/CA+HiwqFfiai=qBxPDTjaio_ZcaqUKh+FC=prESrB8ogZgFNNNQ@mail.gmail.com
This commit is contained in:
@@ -107,7 +107,7 @@ convert_tuples_by_name(TupleDesc indesc,
|
||||
int n = outdesc->natts;
|
||||
|
||||
/* Verify compatibility and prepare attribute-number map */
|
||||
attrMap = build_attrmap_by_name_if_req(indesc, outdesc);
|
||||
attrMap = build_attrmap_by_name_if_req(indesc, outdesc, false);
|
||||
|
||||
if (attrMap == NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user