Обсуждение: unrecognized language plpgsql
Hello. This is the error message I get when trying to create a function in plpgsql: ERROR: Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'. Recognixed languages are sql, C, internal, and created procedural languages. I use Debian packages for Pg 7.1 BETA4. I thought plpgsql was integrated by default, but see it is not so. Might I install plpgsql as procedural language or am I doing something wrong?. Thanks. David
DaVinci <bombadil@wanadoo.es> wrote: > ERROR: Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'. > I use Debian packages for Pg 7.1 BETA4. I thought plpgsql was integrated by > default, but see it is not so. I have the same problem with 7.1RC2 built using Oliver's Debian diff for 7.1beta4. > Might I install plpgsql as procedural language Yes. Make sure you've installed the postgresql-pl.deb and run createlang(1) for your databases. HTH, Ray -- Hacker and proud.
Good day everybody, My problem is that i can't use a variabile to name a table, like this: select INTO id,domeniu idp,nume FROM $2 where idc=$1; ^^ I was having the same problem with creating a table: create table $1(id serial,stuff text); ^^ was give me the same error: 010404.09:17:45.062 [767] ERROR: parser: parse error at or near "$1" 010404.09:17:45.063 [767] DEBUG: Last error occured while executing PL/pgSQL function domenii 010404.09:17:45.063 [767] DEBUG: line 8 at select into variables Is there any problem naming tables with variabiles???? I haven't find anything in the manual. Thanks very much. Diana Cionoiu
J.H.M. Dassen (Ray) wrote: >DaVinci <bombadil@wanadoo.es> wrote: >> ERROR: Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'. > >> I use Debian packages for Pg 7.1 BETA4. I thought plpgsql was integrated b >y >> default, but see it is not so. > >I have the same problem with 7.1RC2 built using Oliver's Debian diff for >7.1beta4. In the final release of 7.1 for Debian, plpgsql will be included in the main postgresql package. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47 GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "Thou will keep him in perfect peace, whose mind is stayed on thee, because he trusts in thee." Isaiah 26:3
To the best of my knowledge, you can't use parameters for table names. But if you have 7.1, you can use the EXECUTE command to dynamically generate (and execute) any SQL statement. Check out: http://postgresql.readysetnet.com/devel-corner/docs/programmer/plpgsql-descr iption.html Specifically: 24.2.5.3. Executing dynamic queries Greg ----- Original Message ----- From: "Diana Cionoiu" <diana@softwaresolutions.ro> To: <pgsql-general@postgresql.org> Sent: Wednesday, April 04, 2001 2:27 AM Subject: problems with variabiles in plpgsql > Good day everybody, > > My problem is that i can't use a variabile to name a table, like this: > > select INTO id,domeniu idp,nume FROM $2 where idc=$1; > ^^ > I was having the same problem with creating a table: > > create table $1(id serial,stuff text); > ^^ > was give me the same error: > > 010404.09:17:45.062 [767] ERROR: parser: parse error at or near "$1" > 010404.09:17:45.063 [767] DEBUG: Last error occured while executing > PL/pgSQL function domenii > 010404.09:17:45.063 [767] DEBUG: line 8 at select into variables > > Is there any problem naming tables with variabiles???? > > I haven't find anything in the manual. > > Thanks very much. > > Diana Cionoiu > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) >