Re: create or replace language

Поиск
Список
Период
Сортировка
От Andreas 'ads' Scherbaum
Тема Re: create or replace language
Дата
Msg-id 20080503183802.7984d44b@iridium.wars-nicht.de
обсуждение исходный текст
Ответ на Re: create language ... if not exists  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: create or replace language  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
On Sat, 29 Mar 2008 22:35:21 -0400 Tom Lane wrote:

> The key argument seems to be that it's quite unclear what the state
> following CREATE IF NOT EXISTS (CINE) should be, if the object does
> exist but not with the same properties specified in the CINE command.
> CREATE OR REPLACE resolves that by making it clear that it's gonna be
> what the command says.  Perhaps there is a use-case for the alternate
> behavior where the pre-existing object doesn't get modified, but I'm
> not too sure what it would be.

Attached is a first version for the "CREATE OR REPLACE LANGUAGE" patch.
It's still missing some functionality (especially the update part is
far away from being complete) and it's also missing documentation.

I just want to know if i'm heading in the right direction or if
something is totally broken in my basic approach:


In case a language is already in pg_pltemplate, the (possibly changed)
values from this table are used to update the pg_languages entry. This
gives the ability to change the owner, trust status, the language or
validator handler.

In case the language is not in pg_pltemplate, the values from the
commandline are used, just like "create language".



Thanks & kind regards

--
                Andreas 'ads' Scherbaum
German PostgreSQL User Group

Вложения

В списке pgsql-patches по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Sigh ...
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Exposing keywords to clients