Jump to content

Recommended Posts

Posted

I'm seeing it as installed:

 

postgres=# SELECT COUNT(*) FROM pg_language WHERE lanname = 'plpgsql';
count 
-------
     1
(1 row)

Guest Geoff
Posted
Hello, I have the same prooblem, I really need plpgsql to my functions. Thanks

 

Are you also on johnny?

Posted

Hi djbob,

 

SELECT COUNT(*) FROM pg_language WHERE lanname = 'plpgsql';

 

count

0

 

and I try to create a function

 

CREATE OR REPLACE FUNCTION dologin(IN i_user varchar, IN i_password varchar, OUT o_group integer) RETURNS INTEGER AS

$$

DECLARE

BEGIN

SELECT group_id INTO o_group FROM users WHERE nick=i_user AND password=i_password;

IF NOT FOUND THEN

SELECT 0 INTO o_group;

END IF;

 

RETURN;

END;

$$ LANGUAGE plpgsql;

 

Because the plgpsql is not loaded by default I should to be loaded at the schema you want.

 

I try on a Centos Virtual Machine and loaded the plpsql as postgres and other user wiht other schema cant access it.

 

Thanks for your time djbob.

 

Posted

It is not necessary, you can access to my schema and execute the command.

My schema is gespro on database gespro_db.

Guest
This topic is now closed to further replies.
×
×
  • Create New...