language "plpgsql" does not exist

Lists: pgsql-sql
From: Bruce Young <hbrucey(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: language "plpgsql" does not exist
Date: 2003-05-23 06:48:31
Message-ID: 20030523064831.64448.qmail@web10403.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

i am trying to create functions only to get the above error in return.
what do i need to do to get PL/PGSQL functions working?
example:

CREATE FUNCTION logfunc1(text) RETURNS timestamp AS '
DECLARE
logtxt ALIAS FOR $1;
BEGIN
INSERT INTO logtable VALUES (logtxt, ''now'');
RETURN ''now'';
END;
' LANGUAGE plpgsql;

# ERROR: language "plpgsql" does not exist

any help appreciated

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com


From: Devrim GUNDUZ <devrim(at)gunduz(dot)org>
To: Bruce Young <hbrucey(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: language "plpgsql" does not exist
Date: 2003-05-23 09:43:33
Message-ID: Pine.LNX.4.44.0305231241170.14463-100000@emo.org.tr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql


Hİ,

On Thu, 22 May 2003, Bruce Young wrote:

> # ERROR: language "plpgsql" does not exist

Use createlang for installing plpgsql to that database.

usage: createlang plpgsql dbname

Remember that createlang may require additional options like username,
port, etc. Detailed usage is written in man page.

Regards,
--
Devrim GUNDUZ
devrim(at)gunduz(dot)org devrim(dot)gunduz(at)linux(dot)org(dot)tr
http://www.tdmsoft.com
http://www.gunduz.org


From: Richard Huxton <dev(at)archonet(dot)com>
To: Bruce Young <hbrucey(at)yahoo(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: language "plpgsql" does not exist
Date: 2003-05-23 10:26:31
Message-ID: 200305231126.31947.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

On Friday 23 May 2003 7:48 am, Bruce Young wrote:
> i am trying to create functions only to get the above error in return.
> what do i need to do to get PL/PGSQL functions working?
> example:
>
> CREATE FUNCTION logfunc1(text) RETURNS timestamp AS '
> DECLARE
> logtxt ALIAS FOR $1;
> BEGIN
> INSERT INTO logtable VALUES (logtxt, ''now'');
> RETURN ''now'';
> END;
> ' LANGUAGE plpgsql;
>
> # ERROR: language "plpgsql" does not exist

You need to do a "CREATE LANGUAGE" or use the createlang command-line tool to
enable it in your database:

createlang plpgsql mydatabase

--
Richard Huxton


From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Bruce Young <hbrucey(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: language "plpgsql" does not exist
Date: 2003-05-23 11:10:39
Message-ID: 1053688239.279.31.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

> # ERROR: language "plpgsql" does not exist

You need to create it before you may use it.

http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=xplang-install.html

--
Rod Taylor <rbt(at)rbt(dot)ca>

PGP Key: http://www.rbt.ca/rbtpub.asc


From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Bruce Young <hbrucey(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: language "plpgsql" does not exist
Date: 2003-05-23 11:18:59
Message-ID: 1053688738.25708.2472.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

On Fri, 2003-05-23 at 07:48, Bruce Young wrote:
> i am trying to create functions only to get the above error in return.
> what do i need to do to get PL/PGSQL functions working?
> example:
...
> # ERROR: language "plpgsql" does not exist

Use the createlang script to create the language in that database.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"But where shall wisdom be found? And where is the
place of understanding? It cannot be gotten for gold,
neither shall silver be weighed for the price thereof.
Whence then cometh wisdom? and where is the place of
understanding? ...Behold the fear of the Lord, that is
wisdom; and to depart from evil is understanding."
Job 12,15,20,28


From: "Victor Yegorov" <viktors(dot)jegorovs(at)nordlb(dot)lv>
To: Bruce Young <hbrucey(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: language "plpgsql" does not exist
Date: 2003-05-23 11:32:43
Message-ID: 20030523113243.GD15931@nordlb.lv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

* Bruce Young <hbrucey(at)yahoo(dot)com> [23.05.2003 14:29]:
> i am trying to create functions only to get the above error in return.
> what do i need to do to get PL/PGSQL functions working?
> example:
>
> CREATE FUNCTION logfunc1(text) RETURNS timestamp AS '
> DECLARE
> logtxt ALIAS FOR $1;
> BEGIN
> INSERT INTO logtable VALUES (logtxt, ''now'');
> RETURN ''now'';
> END;
> ' LANGUAGE plpgsql;
>
> # ERROR: language "plpgsql" does not exist

issue the following command on console (comand interpreter):

$ createlang plpgsql <dbname>

--

Victor Yegorov


From: "A(dot)Bhuvaneswaran" <bhuvan(at)symonds(dot)net>
To: Bruce Young <hbrucey(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: language "plpgsql" does not exist
Date: 2003-05-23 12:27:27
Message-ID: Pine.LNX.4.44.0305231756160.2714-100000@Bhuvan.bksys.co.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

> i am trying to create functions only to get the above error in return.
> what do i need to do to get PL/PGSQL functions working?
> example:
>
> CREATE FUNCTION logfunc1(text) RETURNS timestamp AS '
> DECLARE
> logtxt ALIAS FOR $1;
> BEGIN
> INSERT INTO logtable VALUES (logtxt, ''now'');
> RETURN ''now'';
> END;
> ' LANGUAGE plpgsql;
>
> # ERROR: language "plpgsql" does not exist

The problem is, you have not installed the language 'plpgsql'. It can be
done using createlang command.

regards,
bhuvaneswaran


From: Bruce Young <hbrucey(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: language "plpgsql" does not exist
Date: 2003-05-23 13:40:04
Message-ID: 20030523134004.47108.qmail@web10401.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

Whoa! thanks a lot guys. didnt RTFM enough.
i now got it working from the following command:

$ createlang plpgsql <dbname>

Question is: why did it prompt me to enter my password so many times? 4 to be
exact.
i only have one user besides postgres.

thanks again.

- bruce

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com


From: Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: Bruce Young <hbrucey(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: language "plpgsql" does not exist
Date: 2003-05-23 15:43:09
Message-ID: Pine.LNX.4.44.0305231333350.30269-100000@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

On Thu, 22 May 2003, Bruce Young wrote:

> i am trying to create functions only to get the above error in return.
> what do i need to do to get PL/PGSQL functions working?
> example:
>
> CREATE FUNCTION logfunc1(text) RETURNS timestamp AS '
> DECLARE
> logtxt ALIAS FOR $1;
> BEGIN
> INSERT INTO logtable VALUES (logtxt, ''now'');
> RETURN ''now'';
> END;
> ' LANGUAGE plpgsql;
>
> # ERROR: language "plpgsql" does not exist

Do
CREATE FUNCTION plpgsql_call_handler () RETURNS language_handler
AS '/usr/local/pgsql/lib/plpgsql.so', 'plpgsql_call_handler'
LANGUAGE c;

CREATE TRUSTED PROCEDURAL LANGUAGE plpgsql HANDLER plpgsql_call_handler;

>
>
> any help appreciated
>
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

--
==================================================================
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel: +30-210-8981112
fax: +30-210-8981877
email: achill(at)matrix(dot)gatewaynet(dot)com
mantzios(at)softlab(dot)ece(dot)ntua(dot)gr


From: PeterKorman <calvin-pgsql-ml(at)eigenvision(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Cc: Bruce Young <hbrucey(at)yahoo(dot)com>
Subject: Re: language "plpgsql" does not exist
Date: 2003-05-24 00:43:38
Message-ID: 20030524004338.GA5799@eigenvision.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

On Fri, May 23, 2003 at 06:40:04AM -0700, Bruce Young wrote:
> Whoa! thanks a lot guys. didnt RTFM enough.
> i now got it working from the following command:
>
> $ createlang plpgsql <dbname>
>
> Question is: why did it prompt me to enter my password so many times? 4 to be
> exact.
> i only have one user besides postgres.
>
> thanks again.
>

I'm 3 days into postgresql so dont chisel this answer into stone.

I just went through a hunt for this. If you want the plpgsql language to
show up in all your databases then connect to template1
and do the work within the psql client. I don't see any way to use
createlang on template1. But that will save you doing it on
all your databases.

There must be some overhead on this onaccounta it is not part
of template1 to begin with. Odd.

Apparently there are a multitude of possible languages you
can install. PL/Perl, PL/TCL ..., Etc.

Cheers,

JPK


From: "A(dot)Bhuvaneswaran" <bhuvan(at)symonds(dot)net>
To: Bruce Young <hbrucey(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: language "plpgsql" does not exist
Date: 2003-05-24 04:44:43
Message-ID: Pine.LNX.4.44.0305241014140.1087-100000@Bhuvan.bksys.co.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

> Question is: why did it prompt me to enter my password so many times? 4 to be
> exact.
> i only have one user besides postgres.

Run your command with -e option and would answer your query -:)

regards,
bhuvaneswaran