Re: create or replace language - Mailing list pgsql-patches

From Tom Lane
Subject Re: create or replace language
Date
Msg-id 9942.1209836045@sss.pgh.pa.us
Whole thread Raw
In response to Re: create or replace language  (Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>)
Responses Re: create or replace language
Re: create or replace language
List pgsql-patches
"Andreas 'ads' Scherbaum" <adsmail@wars-nicht.de> writes:
> 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.

It strikes me that if there are any existing functions in the language,
we might want to restrict what can be changed by CREATE OR REPLACE.
For instance switching to a completely different language handler
doesn't seem like a great idea.

The equivalent problem for views and functions is handled by restricting
CREATE OR REPLACE to not change the output column set of a view or the
type signature of a function, independently of whether there are any
actual references to the object.  So maybe the right thing is that
CREATE OR REPLACE LANGUAGE can change "inessential" properties of an
existing language, but not the core properties --- which might only be
the handler function, though you could make a case for the validator and
the trusted flag as well.

            regards, tom lane

pgsql-patches by date:

Previous
From: Andreas 'ads' Scherbaum
Date:
Subject: Re: configure option for XLOG_BLCKSZ
Next
From: Andreas 'ads' Scherbaum
Date:
Subject: Re: create or replace language