Hi
I am sending a review of this trivial patch.
1.This patch enables the possibility to restore only selected view, mat. view, foreign table or sequence. Currently the option -t works with tables only. All other relation like objects are quietly ignored. With this patch, the check on type is enhanced to allow other types described by pg_class system table. The implementation is trivial:
+ strcmp(te->desc, "TABLE DATA") == 0 ||
+ strcmp(te->desc, "VIEW") == 0 ||
+ strcmp(te->desc, "FOREIGN TABLE") == 0 ||
+ strcmp(te->desc, "MATERIALIZED VIEW") == 0 ||
+ strcmp(te->desc, "MATERIALIZED VIEW DATA") == 0 ||
+ strcmp(te->desc, "SEQUENCE") == 0)
2. There was not any objections against this patch.
3. There was not any problem with patching and compilation.
4. This feature is good enough documented.
There is opened question, if the related line should be changed? The current text is not 100% accurate, but it is short, and well readable and understandable.
-S, --superuser=NAME superuser user name to use for disabling triggers
-t, --table=NAME restore named table
-T, --trigger=NAME restore named trigger
5. All tests passed
6. There are no tests. But pg_dump related sw has not any tests yet.
I don't see any issues - this patch is really trivial without risks. It is working already on pg_dump side, so the fix on pg_restore side is natural.
Regards
Pavel