Skip site navigation (1) Skip section navigation (2)

Re: How to successfully create a new function?

From: Len <lecneri(at)gmail(dot)com>
To: Jim Moon <moonjamesg(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: How to successfully create a new function?
Date: 2012-03-30 20:09:36
Message-ID: CAJGpuxsUHAT+2hdho-891c+p8QQe_GWpm46+Z2doJptt3db2FA@mail.gmail.com (view raw or flat)
Thread:
Lists: 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(at)gmail(dot)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
>
>
>
>

In response to

pgsql-novice by date

Next:From: Leif Biberg KristensenDate: 2012-03-31 07:33:02
Subject: Re: How to successfully create a new function?
Previous:From: Alex KoayDate: 2012-03-30 19:31:28
Subject: Using Table Indexes After Joins

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group