Changing user
От | C G |
---|---|
Тема | Changing user |
Дата | |
Msg-id | LAW12-F93Ks8TAGUjGn00009220@hotmail.com обсуждение исходный текст |
Ответы |
Re: Changing user
|
Список | pgsql-general |
Dear All, I have a simple table CREATE TABLE table1{ user name, si numeric }; Also I have function: CREATE FUNCTION check1(numeric) RETURN text AS' DECLARE SI ALIAS AS $1; username name; BEGIN username:=(SELECT user FROM table1 WHERE si=SI) SET SESSION AUTHORIZATION username; RETURN username; END; 'LANGUAGE 'plpgsql'; However, when I call the function I get the error: ERROR: syntax error at or near "$1" at character 28 CONTEXT: PL/pgSQL function "check1" line11 at SQL statement If I comment out the "SET SESSION ..." the function works, i.e. it outputs a valid username. I create and execute the function as a superuser. Any suggestions? Many thanks Colin _________________________________________________________________ Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile
В списке pgsql-general по дате отправления: