Re: How to successfully create a new function?

Поиск
Список
Период
Сортировка
От Len
Тема Re: How to successfully create a new function?
Дата
Msg-id CAJGpuxsUHAT+2hdho-891c+p8QQe_GWpm46+Z2doJptt3db2FA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to successfully create a new function?  (Jim Moon <moonjamesg@gmail.com>)
Список pgsql-novice
You should "install" the language in your database.

http://www.postgresql.org/docs/8.0/static/xplang.html 

On Fri, Mar 30, 2012 at 12:17 PM, Jim Moon <moonjamesg@gmail.com> wrote:

Andreas,


Thank you for your advice--query and other:


This query:


CREATE OR REPLACE FUNCTION "sp_SetScenario"(scen character varying) RETURNS void AS

$BODY$DECLARE

               sqlStatement varchar(500);

BEGIN

               SET sqlStatement = 'ALTER USER postgres WITH DEFAULT_SCHEMA = $1';

               EXECUTE(sqlStatement);

END;

$BODY$

LANGUAGE 'pgpsql' VOLATILE

COST 100;

 

 

returns:

 

ERROR:  language "pgpsql" does not exist

********** Error **********

ERROR: language "pgpsql" does not exist

SQL state: 42704

 

The only language options in the New Function “wizard” in pgAdmin III are:

internal

c

sql

I would be grateful for any further suggestions from you or others.


Kind regards,
Jim




В списке pgsql-novice по дате отправления:

Предыдущее
От: Alex Koay
Дата:
Сообщение: Using Table Indexes After Joins
Следующее
От: Leif Biberg Kristensen
Дата:
Сообщение: Re: How to successfully create a new function?