Ver Mensaje Individual
Antiguo 16-mar-2008, 19:25   #1 (permalink)
xtstgo
xtstgo ha deshabilitado el karma
 
Fecha de Ingreso: octubre-2005
Mensajes: 26
llamada a function

Amigos les quiero pedir ayuda, soy un novato q quiere empezar a trabajar con Postgres, TE go el siguiente codigo como function:

Código PHP:
CREATE OR REPLACE FUNCTION "public"."p_accesousuario" (v_usu_id charRETURNS varchar AS
$body$
BEGIN
  select 1 from sc_usuario
   where usu_id 
v_usu_id    
   
   if 
not found THEN
           
return "Valido";         
   else
           return 
"Invalido";
   
end if;  
END;
$body$
LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER
he intento llamarlo de la siguiente manera:

Código PHP:
select from p_accesousuario("carlos"); 
y el resultado de este es:

Código PHP:
ERROR:  column "carlos" does not exist at character 31 
les agradeceria su ayuda.
xtstgo está desconectado   Responder Citando