From: | "Milen A(dot) Radev" <milen(at)radev(dot)net> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: System Date |
Date: | 2007-01-19 08:22:37 |
Message-ID: | 45B07FCD.2090001@radev.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Vasu Kamma (vakamma) | 2007-01-19 08:30:46 | Postgres installation on windows |
Previous Message | Gregory S. Williamson | 2007-01-19 03:34:42 | Re: Strange performance hit upgrading from 8.0.9 to 8.2.1 |