Re: [PATCHES] create language ... if not exists

2008-03-30 Thread Andreas 'ads' Scherbaum
Hello Heikki, On Sat, 29 Mar 2008 11:49:56 + Heikki Linnakangas wrote: > 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 >

Re: [PATCHES] create language ... if not exists

2008-03-30 Thread Andreas 'ads' Scherbaum
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

Re: [PATCHES] create language ... if not exists

2008-03-29 Thread Tom Lane
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

Re: [PATCHES] create language ... if not exists

2008-03-29 Thread Magnus Hagander
Tom Lane wrote: > Magnus Hagander <[EMAIL PROTECTED]> writes: > > If we're implementing IF NOT EXISTS across the board, let's do that > > for languages at the same time as for others. > > Yeah, if we were going to do it at all it should be handled > across-the-board, the way DROP IF EXISTS was. H

Re: [PATCHES] create language ... if not exists

2008-03-29 Thread Tom Lane
Magnus Hagander <[EMAIL PROTECTED]> writes: > If we're implementing IF NOT EXISTS across the board, let's do that for > languages at the same time as for others. Yeah, if we were going to do it at all it should be handled across-the-board, the way DROP IF EXISTS was. However, I seem to recall tha

Re: [PATCHES] create language ... if not exists

2008-03-29 Thread Magnus Hagander
Heikki Linnakangas wrote: > Tom Lane wrote: > > Heikki Linnakangas <[EMAIL PROTECTED]> writes: > >> 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. > > > > If we're willing to consider a so

Re: [PATCHES] create language ... if not exists

2008-03-29 Thread Heikki Linnakangas
Tom Lane wrote: Heikki Linnakangas <[EMAIL PROTECTED]> writes: 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. If we're willing to consider a solution that is specific to CREATE LANGUAGE (as oppo

Re: [PATCHES] create language ... if not exists

2008-03-29 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > 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. If we're willing to consider a solution that is specific to CREATE LANGUAGE (as opposed to implemen

Re: [PATCHES] create language ... if not exists

2008-03-29 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> 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 reason

Re: [PATCHES] create language ... if not exists

2008-03-29 Thread Andrew Dunstan
Heikki Linnakangas wrote: 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 ch

Re: [PATCHES] create language ... if not exists

2008-03-29 Thread Heikki Linnakangas
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 o