UPDATE pg_language SET lanpltrusted=true WHERE lanname='plpgsql'

From: PeterKorman <calvin-pgsql-ml(at)eigenvision(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: UPDATE pg_language SET lanpltrusted=true WHERE lanname='plpgsql'
Date: 2003-05-24 15:58:59
Message-ID: 20030524155859.GA17041@eigenvision.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have:

---------------------------------------------------------------------

template1=# select * from pg_language;

lanname | lanispl | lanpltrusted | lanplcallfoid | lancompiler
----------+---------+--------------+---------------+-------------
internal | f | f | 0 | n/a
C | f | f | 0 | /bin/cc
sql | f | f | 0 | postgres
plpgsql | t | f | 16709 | PL/pgSQL
(4 rows)

---------------------------------------------------------------------

I wanna do this:

---------------------------------------------------------------------
UPDATE pg_language SET lanpltrusted=true WHERE lanname='plpgsql';
---------------------------------------------------------------------

Is this gonna break anything? That is, are there dependencies
in this table that I will break or otherwise compromise if I
perform the above sql update. Does the effect of:

'CREATE TRUSTED LANGUAGE'

differ from:

'CREATE LANGUAGE',

some way other than setting true, the 'lanpltrusted' column of
the 'plpgsql' row, of the 'pg_language' table?

I understand that my other option is to delete the language
and then add it create it
again with:

---------------------------------------------------------------------
drop language 'plpgsql';
drop function 'plpgsql_call_handler';

CREATE FUNCTION plpgsql_call_handler ()
RETURNS OPAQUE
AS '/usr/lib/postgresql/plpgsql.so'
LANGUAGE 'C';

CREATE TRUSTED LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler
LANCOMPILER 'PL/pgSQL';
---------------------------------------------------------------------

Thanks.
Cheers,

JPK

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-05-24 17:37:14 Re: XML ouput for psql
Previous Message Bruce Momjian 2003-05-24 15:57:34 Re: Yet another configuration patch with include, and configuration