I there!! I'm using pl/pgsql in my application, but I'm having a problem
with the returning value. What my function does is quering the db and
according to the result of the different queries returns a error message or
some information from the db. I'm inserting the correct information in a
record variable, but I cant insert text in a variable like this,the error
message created by me. Is it possible, or is there another returning type
that I can use??
DECLARE
val_pub text;
asds Record;
BEGIN
RAISE NOTICE 'validate_user()';
val_pub:=$1;
EXECUTE 'SELECT count(*) FROM public_identif WHERE
identity='||quote_literal(val_pub) INTO asds;
IF asds.count=0 THEN
RETURN 'DIAMETER_ERROR_USER_UNKNOWN';
END IF;
EXECUTE 'SELECT name FROM public_identif WHERE
identity='||quote_literal(val_pub) INTO asds;
RETURN name; -----array of text!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
RETURN NULL;
END;
tks a lot in advance