Is it possible to create an empty or dummy index in postgres?
upgrade script expects an index to exist only so that it can drop that index [...] Instead of taking the time to recreate the index is it possible to create a "dummy" or empty index with the same name so that the upgrade script can run?


Just delete that line from the update script. Or even better, use the IF EXISTS clause so it throws a notice not an error.

Command:     DROP INDEX
Description: remove an index
Syntax:
DROP INDEX [ CONCURRENTLY ] [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]


But yes, the DROP INDEX doesn't even know if the index is on a specified table if you're dropping by index name and not by table(column) location.

Here is an example,

CREATE TABLE foo ( x int );
CREATE INDEX ON foo(x);
CREATE TABLE bar ( LIKE foo );

\d foo;
      Table "public.foo"
 Column |  Type   | Modifiers 
--------+---------+-----------
 x      | integer | 
Indexes:
    "foo_x_idx" btree (x)

--
-- HERE WE DROP FOR THE FIRST TIME
--
DROP INDEX foo_x_idx ;
DROP INDEX

--
-- RECREATE
--
CREATE INDEX foo_x_idx ON bar(x);

--
-- DROP AGAIN
--
DROP INDEX foo_x_idx;
DROP INDEX