Skip site navigation (1) Skip section navigation (2)

Re: create language ... if not exists

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Andreas 'ads' Scherbaum <adsmail(at)wars-nicht(dot)de>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: create language ... if not exists
Date: 2008-03-29 11:49:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Andreas 'ads' Scherbaum wrote:
> The attached patch for HEAD extends the CREATE LANGUAGE statement by an
> IF NOT EXISTS option which in effect changes the raised error into a
> notice.
> Before i continue working on this patch i would like to know if this
> extension has a chance to go into PG and what other changes i should
> apply (beside the missing documentation).

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.

Regarding the patch itself: You define rule "opt_if_not_exists", but 
never use it. And you add a new rule for "CREATE LANGUAGE ... HANDLER 
...", but forgot "IF_P NOT EXISTS" from the end of that. Looks like you 
couldn't decide which approach to take, and ended up doing a little bit 
of both ;-).

   Heikki Linnakangas

In response to


pgsql-patches by date

Next:From: Bruce MomjianDate: 2008-03-29 12:03:20
Subject: Re: [PATCHES] Implemented current_query
Previous:From: Simon RiggsDate: 2008-03-29 09:09:29
Subject: Re: Auto-explain patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group