Re: System Date

Поиск
Список
Период
Сортировка
От Milen A. Radev
Тема Re: System Date
Дата
Msg-id 45B07FCD.2090001@radev.net
обсуждение исходный текст
Ответ на Re: System Date  ("Negandhi, Nishith" <Nishith.Negandhi@infoUSA.com>)
Список 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

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Gregory S. Williamson"
Дата:
Сообщение: Re: Strange performance hit upgrading from 8.0.9 to 8.2.1
Следующее
От: "Vasu Kamma \(vakamma\)"
Дата:
Сообщение: Postgres installation on windows