Re: How to successfully create a new function? - Mailing list pgsql-novice

From Jim Moon
Subject Re: How to successfully create a new function?
Date
Msg-id CAMW+QwGGxwqkQnAfg33E0XodJJD-DDzwJQuaieMO+-ZmLnKZoQ@mail.gmail.com
Whole thread Raw
In response to How to successfully create a new function?  ("Moon, James" <moonj@pbworld.com>)
Responses Re: How to successfully create a new function?
Re: How to successfully create a new function?
List pgsql-novice

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 by date:

Previous
From: Ennio-Sr
Date:
Subject: Re: Disruptive corruption of data during an update
Next
From: Alex Koay
Date:
Subject: Using Table Indexes After Joins