Re: create language ... if not exists
От | Tom Lane |
---|---|
Тема | Re: create language ... if not exists |
Дата | |
Msg-id | 9103.1206808536@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: create language ... if not exists (Andrew Dunstan <andrew@dunslane.net>) |
Список | pgsql-patches |
Andrew Dunstan <andrew@dunslane.net> writes: > Heikki Linnakangas wrote: >> The way we've solved this problem for other CREATE commands is to add >> "OR REPLACE" option, instead of "IF NOT EXISTS". We should do the same >> here. > My recollection is that we only do that where we need to for reasons of > dependency. Not sure that applies here. I was about to make the same complaint as Heikki. We currently have two different ways of dealing with this type of scenario: DROP IF EXISTS (for most object types) CREATE OR REPLACE (for functions, rules, views) The OP wants to introduce yet a third variant, implemented for only one kind of object. That's not a feature, it's a wart. Clearly DROP IF EXISTS isn't helpful for the proposed use-case (since you'd lose any pre-existing functions in the language) but I don't see why CREATE OR REPLACE wouldn't serve. regards, tom lane
В списке pgsql-patches по дате отправления: