Re: Drop/ Alter index if exist - Mailing list pgsql-general

From Filip Rembiałkowski
Subject Re: Drop/ Alter index if exist
Date
Msg-id 92869e660912220601h45113babx53d71fee47864100@mail.gmail.com
Whole thread Raw
In response to Drop/ Alter index if exist  (Pau Marc Munoz Torres <paumarc@gmail.com>)
Responses Re: Drop/ Alter index if exist
List pgsql-general


2009/12/22 Pau Marc Munoz Torres <paumarc@gmail.com>
Hi every body
 

 there is some way to delete or rename an index only if this index exists?

something like

"alter index index rename to pepe if exists"


for drop - yes:
DROP INDEX IF EXISTS name;

for rename - there is no simple solution. well, actually there are solutions but they are more complicated than the problem.
(think of user defined functions)


--
Filip Rembiałkowski
JID,mailto:filip.rembialkowski@gmail.com
http://filip.rembialkowski.net/

pgsql-general by date:

Previous
From: "Wappler, Robert"
Date:
Subject: Re: table-valued arguments for functions
Next
From: Greg Smith
Date:
Subject: Re: Not finding RPMs for 8.4.2!