Re: create language ... if not exists

From: Andreas 'ads' Scherbaum <adsmail(at)wars-nicht(dot)de>
To: pgsql-patches(at)postgresql(dot)org
Subject: Re: create language ... if not exists
Date: 2008-03-30 10:49:17
Message-ID: 20080330124917.7039afe0@iridium.wars-nicht.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Hello all,

sorry, was off yesterday and i'm just reading all your answers.

On Sat, 29 Mar 2008 22:35:21 -0400 Tom Lane wrote:

> I wrote:
> > ... However, I seem to recall
> > that in the discussions leading up to implementing DROP IF EXISTS,
> > we considered and specifically rejected CREATE IF NOT EXISTS. Don't
> > have time right now to troll the archives for the reasoning.
>
> [ back from dinner party... ] Here's the thread I was remembering:
> http://archives.postgresql.org/pgsql-hackers/2005-10/msg00632.php
>
> 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.

Tom: this answers my other question: if someone executes a REPLACE
LANGUAGE and as example is using another handler, the new handler
should replace the old one. Correct?

So i will change my small patch and reimplement this extension with
CREATE OR REPLACE.

Thanks all for your useful answers.

--
Andreas 'ads' Scherbaum
German PostgreSQL User Group

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Heikki Linnakangas 2008-03-30 16:06:59 Re: printTable API (was: Show INHERIT in \du)
Previous Message Andreas 'ads' Scherbaum 2008-03-30 10:45:32 Re: create language ... if not exists