From: ChenJiaoqian (@ChenJiaoqian) <noreply+ChenJiaoqian@github.com>
To: reorg/pg_repack <noreply+reorg-pg_repack@github.com>
Subject: [reorg/pg_repack] issue #259: When using options "--exclude-extension/-C" with wrong value, no error message output
Date: Mon, 21 Dec 2020 09:29:33 +0000
Message-ID: <gh-reorg-pg_repack-259@github.com> (raw)
When using options --exclude-extension/-C with wrong values, there are no error message output and the program ends normally.
For example:
```
[postgres@postgresql pg_repack]$ pg_repack --exclude-extension=XXX
INFO: repacking table "dbms_stats.backup_history"
INFO: repacking table "dbms_stats.column_stats_backup"
INFO: repacking table "dbms_stats.column_stats_locked"
INFO: repacking table "dbms_stats.relation_stats_backup"
INFO: repacking table "dbms_stats.relation_stats_locked"
INFO: repacking table "public.test_table"
[postgres@postgresql pg_repack]$
[postgres@postgresql pg_repack]$ echo $?
0
[postgres@postgresql pg_repack]$
```
When other parameters use the wrong value, an error message will be output.
For example:
```
[postgres@postgresql pg_repack]$ pg_repack -t XXX
ERROR: pg_repack failed with error: ERROR: relation "xxx" does not exist
[postgres@postgresql pg_repack]$
[postgres@postgresql pg_repack]$ echo $?
20
[postgres@postgresql pg_repack]$
```
So I think it should output error message when wrong values are used in options --exclude-extension/-C.