Re: create or replace language

From: Andreas 'ads' Scherbaum <adsmail(at)wars-nicht(dot)de>
To: pgsql-patches(at)postgresql(dot)org
Subject: Re: create or replace language
Date: 2008-05-03 16:38:02
Message-ID: 20080503183802.7984d44b@iridium.wars-nicht.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Attachment Content-Type Size
create_or_replace_language-patch-2008-05-03.patch text/x-patch 9.5 KB

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-05-03 17:12:41 Re: Exposing keywords to clients
Previous Message Andrew Dunstan 2008-05-03 13:11:26 Re: [COMMITTERS] pgsql: Sigh ...