Negandhi, Nishith написа:
> Hi Thanx..one more help.
> I am creating a function that will retuen the current systemdate.
>  
> CREATE FUNCTION "CreateDate"() RETURNS date AS 
> 'select now();' 
> LANGUAGE 'plpgsql';
>  
> However, I get the error:
>  
> ERROR:  syntax error at or near "select" at character 51
>  
> Any suggestions .??
>  
[...]


CREATE FUNCTION "CreateDate"() RETURNS date AS
'select CURRENT_DATE;'
LANGUAGE SQL;

(more info here -
http://www.postgresql.org/docs/current/static/xfunc-sql.html)


Although I fail to see the usefulness of such a function.


-- 
Milen A. Radev


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to