pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Pg/PLSQL Errors!!
7+ messages / 6 participants
[nested] [flat]

* Pg/PLSQL Errors!!
@ 2000-05-30 16:36  p.lam@altavista.net
  0 siblings, 4 replies; 7+ messages in thread

From: p.lam@altavista.net @ 2000-05-30 16:36 UTC (permalink / raw)
  To: pgsql-sql

I am running PostgreSQL 6.5.3 on RedHat Linux 6.1 on a PC.
I am trying to use Pg/PLSQL.

I even tried being conservative enough to copy the example code from
http://www.postgresql.org/docs/user/c40874340.htm as follows:
CREATE FUNCTION add_one (int4) RETURNS int4 AS '
    BEGIN
        RETURN $1 + 1;
    END;
' LANGUAGE 'plpgsql';


though, even that results in "ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'pl-pgsql'.  Recognized languages are sql, C, internal and
the created procedural languages."

I have tried variants including PLSQL,PG/PLSQL,PL/SQL,PGSQL  and even 'internal
procedural language(s)' and 'created procedural language(s)' though with the same error.

Does anyone know of the name of the postgreSQL's procedural language of form like
CREATE function funcName(arguments) returns returntype AS 'BEGIN
statement block END;' LANGUAGE '??????';

Many Thanks!



----------------------------------------------------------------
Get your free email from AltaVista at http://altavista.iname.com



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Pg/PLSQL Errors!!
@ 2000-05-30 16:37  Karel Zak <zakkr@zf.jcu.cz>
  parent: p.lam@altavista.net
  3 siblings, 0 replies; 7+ messages in thread

From: Karel Zak @ 2000-05-30 16:37 UTC (permalink / raw)
  To: p.lam@altavista.net; +Cc: pgsql-sql


On Tue, 30 May 2000 p.lam@altavista.net wrote:

> I am running PostgreSQL 6.5.3 on RedHat Linux 6.1 on a PC.
> I am trying to use Pg/PLSQL.
> 
> I even tried being conservative enough to copy the example code from
> http://www.postgresql.org/docs/user/c40874340.htm as follows:
> CREATE FUNCTION add_one (int4) RETURNS int4 AS '
>     BEGIN
>         RETURN $1 + 1;
>     END;
> ' LANGUAGE 'plpgsql';
> 
> 
> though, even that results in "ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'pl-pgsql'.  Recognized languages are sql, C, internal and
> the created procedural languages."
> 
> I have tried variants including PLSQL,PG/PLSQL,PL/SQL,PGSQL  and even 'internal
> procedural language(s)' and 'created procedural language(s)' though with the same error.
> 
> Does anyone know of the name of the postgreSQL's procedural language of form like
> CREATE function funcName(arguments) returns returntype AS 'BEGIN
> statement block END;' LANGUAGE '??????';

 Do you install this language in your DB? See the script 'createlang' in PG
binary tree.
						Karel
		




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Pg/PLSQL Errors!!
@ 2000-05-30 16:57  Tulassay Zsolt <zsolt@tek.bke.hu>
  parent: p.lam@altavista.net
  3 siblings, 0 replies; 7+ messages in thread

From: Tulassay Zsolt @ 2000-05-30 16:57 UTC (permalink / raw)
  To: p.lam@altavista.net; +Cc: pgsql-sql


did you install the procedural language correctly?
under RedHat, you have to do the following:
(the location of the handler is different because of
packaging conventions)

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

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



On Tue, 30 May 2000 p.lam@altavista.net wrote:

> I am running PostgreSQL 6.5.3 on RedHat Linux 6.1 on a PC.
> I am trying to use Pg/PLSQL.
> 
> I even tried being conservative enough to copy the example code from
> http://www.postgresql.org/docs/user/c40874340.htm as follows:
> CREATE FUNCTION add_one (int4) RETURNS int4 AS '
>     BEGIN
>         RETURN $1 + 1;
>     END;
> ' LANGUAGE 'plpgsql';
> 
> 
> though, even that results in "ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'pl-pgsql'.  Recognized languages are sql, C, internal and
> the created procedural languages."
> 
> I have tried variants including PLSQL,PG/PLSQL,PL/SQL,PGSQL  and even 'internal
> procedural language(s)' and 'created procedural language(s)' though with the same error.
> 
> Does anyone know of the name of the postgreSQL's procedural language of form like
> CREATE function funcName(arguments) returns returntype AS 'BEGIN
> statement block END;' LANGUAGE '??????';
> 
> Many Thanks!
> 
> 
> 
> ----------------------------------------------------------------
> Get your free email from AltaVista at http://altavista.iname.com
> 




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Pg/PLSQL Errors!!
@ 2000-05-30 17:01  Frank G Hahn <efgeho@cs.auc.dk>
  parent: p.lam@altavista.net
  3 siblings, 0 replies; 7+ messages in thread

From: Frank G Hahn @ 2000-05-30 17:01 UTC (permalink / raw)
  To: p.lam@altavista.net; +Cc: pgsql-sql

Hi

You need to make the call_handler and create the language plpgsql.
Assuming postgres is installed in /usr/local/pgsql

Example:
-- Setup -- define the languages and the associated handlers
CREATE FUNCTION plpgsql_call_handler () RETURNS OPAQUE AS
  '/usr/local/pgsql/lib/plpgsql.so' LANGUAGE 'C';

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

On Tue, 30 May 2000 p.lam@altavista.net wrote:

> I am running PostgreSQL 6.5.3 on RedHat Linux 6.1 on a PC.
> I am trying to use Pg/PLSQL.
> 
> I even tried being conservative enough to copy the example code from
> http://www.postgresql.org/docs/user/c40874340.htm as follows:
> CREATE FUNCTION add_one (int4) RETURNS int4 AS '
>     BEGIN
>         RETURN $1 + 1;
>     END;
> ' LANGUAGE 'plpgsql';
> 
> 
> though, even that results in "ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'pl-pgsql'.  Recognized languages are sql, C, internal and
> the created procedural languages."
> 
> I have tried variants including PLSQL,PG/PLSQL,PL/SQL,PGSQL  and even 'internal
> procedural language(s)' and 'created procedural language(s)' though with the same error.
> 
> Does anyone know of the name of the postgreSQL's procedural language of form like
> CREATE function funcName(arguments) returns returntype AS 'BEGIN
> statement block END;' LANGUAGE '??????';
> 
> Many Thanks!
> 
> 
> 
> ----------------------------------------------------------------
> Get your free email from AltaVista at http://altavista.iname.com
> 




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Pg/PLSQL Errors!!
@ 2000-05-30 17:19  Tom Lane <tgl@sss.pgh.pa.us>
  parent: p.lam@altavista.net
  3 siblings, 1 reply; 7+ messages in thread

From: Tom Lane @ 2000-05-30 17:19 UTC (permalink / raw)
  To: p.lam@altavista.net; +Cc: pgsql-sql

p.lam@altavista.net writes:
> though, even that results in "ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'pl-pgsql'.  Recognized languages are sql, C, internal and
> the created procedural languages."

Uh, did you run the "createlang" script to install plpgsql into your
database?  It's not installed by default ...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Pg/PLSQL Errors!!
@ 2000-05-31 04:31  SL Baur <steve@beopen.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: SL Baur @ 2000-05-31 04:31 UTC (permalink / raw)
  To: pgsql-sql

Tom Lane <tgl@sss.pgh.pa.us> writes:

> Uh, did you run the "createlang" script to install plpgsql into your
> database?  It's not installed by default ...

Why isn't it installed by default?  Just asking.




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Re: Pg/PLSQL Errors!!
@ 2000-05-31 05:58  Tom Lane <tgl@sss.pgh.pa.us>
  parent: SL Baur <steve@beopen.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2000-05-31 05:58 UTC (permalink / raw)
  To: SL Baur <steve@beopen.com>; +Cc: pgsql-sql

SL Baur <steve@beopen.com> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> Uh, did you run the "createlang" script to install plpgsql into your
>> database?  It's not installed by default ...

> Why isn't it installed by default?  Just asking.

Paranoia, mostly --- we weren't sure we wanted it to be enabled
without an explicit decision by the dbadmin.  I'm not sure I can
point to any compelling reasons why it'd be dangerous, but on the
other side it's not proven to be totally safe either.

pltcl and plperl don't get installed by default either, and those
I definitely wouldn't agree to enabling by default... they don't
have enough track record.  plpgsql is more of a borderline call.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2000-05-31 05:58 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-05-30 16:36 Pg/PLSQL Errors!! p.lam@altavista.net
2000-05-30 16:37 ` Karel Zak <zakkr@zf.jcu.cz>
2000-05-30 16:57 ` Tulassay Zsolt <zsolt@tek.bke.hu>
2000-05-30 17:01 ` Frank G Hahn <efgeho@cs.auc.dk>
2000-05-30 17:19 ` Tom Lane <tgl@sss.pgh.pa.us>
2000-05-31 04:31   ` SL Baur <steve@beopen.com>
2000-05-31 05:58     ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox