Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/03/2008, 18:25
xtstgo
 
Fecha de Ingreso: octubre-2005
Mensajes: 28
Antigüedad: 18 años, 6 meses
Puntos: 1
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.