Re: create or replace language

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andreas 'ads' Scherbaum" <adsmail(at)wars-nicht(dot)de>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: create or replace language
Date: 2008-05-03 17:34:05
Message-ID: 9942.1209836045@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

"Andreas 'ads' Scherbaum" <adsmail(at)wars-nicht(dot)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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Andreas 'ads' Scherbaum 2008-05-03 19:12:51 Re: create or replace language
Previous Message Andreas 'ads' Scherbaum 2008-05-03 17:26:12 Re: configure option for XLOG_BLCKSZ