Another possible bug:
pg_restore -i "\"indexname\"" -d mydb mydumpfile
msg:
pg_restore: connecting to database for restore
pg_restore: creating FUNCTION "plpgsql_call_handler" ()
pg_restore: [archiver (db)] could not execute query: ERROR: function
plpgsql_call_handler already exists with same argument types
pg_restore: *** aborted because of error
I read the pg_restore.c source code, I found:
#ifdef HAVE_GETOPT_LONG struct option cmdopts[] = { {"clean", 0, NULL, 'c'},
{"create",0, NULL, 'C'}, {"data-only", 0, NULL, 'a'}, {"dbname", 1, NULL, 'd'},
{"file", 1, NULL, 'f'}, {"format", 1, NULL, 'F'}, {"function", 1, NULL, 'P'},
{"host", 1, NULL, 'h'}, {"ignore-version", 0, NULL, 'i'}, {"index", 1, NULL, 'I'},
So, -i may be mapped wrong, however, -I is illegal option.
Thanks!
Jie Liang