aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeRecursiveunion.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-06-04 13:05:54 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-06-04 13:05:54 -0400
commitca9e79274938d8ede07d9990c2f6f5107553b524 (patch)
treed546bf562b9cede54cb771a67d55fc936d5f2f5d /src/backend/executor/nodeRecursiveunion.c
parent751ba1a7c168b28a3cc43032e9a1cc996e004054 (diff)
downloadpostgresql-ca9e79274938d8ede07d9990c2f6f5107553b524.tar.gz
postgresql-ca9e79274938d8ede07d9990c2f6f5107553b524.zip
Fix pg_dump's failure to honor dependencies of SQL functions.
A new-style SQL function can contain a parse-time dependency on a unique index, much as views and matviews can (such cases arise from GROUP BY and ON CONFLICT clauses, for example). To dump and restore such a function successfully, pg_dump must postpone the function until after the unique index is created, which will happen in the post-data part of the dump. Therefore we have to remove the normal constraint that functions are dumped in pre-data. Add code similar to the existing logic that handles this for matviews. I added test cases for both as well, since code coverage tests showed that we weren't testing the matview logic. Per report from Sami Imseih. Back-patch to v14 where new-style SQL functions came in. Discussion: https://postgr.es/m/2C1933AB-C2F8-499B-9D18-4AC1882256A0@amazon.com
Diffstat (limited to 'src/backend/executor/nodeRecursiveunion.c')
0 files changed, 0 insertions, 0 deletions