Unable to create function which takes no arguments

Поиск
Список
Период
Сортировка
От Michael Eshom
Тема Unable to create function which takes no arguments
Дата
Msg-id 484D54E0.4070203@oldiesmann.us
обсуждение исходный текст
Ответы Re: Unable to create function which takes no arguments  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Re: Unable to create function which takes no arguments  (hubert depesz lubaczewski <depesz@depesz.com>)
Re: Unable to create function which takes no arguments  (Mark Roberts <mailing_lists@pandapocket.com>)
Список pgsql-sql
<font size="-1"><font face="Arial">I am a project manager for a popular forum system. We are adding support for
PostgreSQLin the next version (which is currently in beta), and have added several PostgreSQL functions to emulate
MySQLfunctions of the same name.<br /><br /> I am trying to create a "UNIX_TIMESTAMP()" function in PostgreSQL, which
willreturn the current timestamp. However, whenever I try to add this function in phpPgAdmin, it says 'Syntax error at
ornear ")" at character 28'.<br /><br /> This is the SQL I'm using:<br /><br /></font></font> <pre>CREATE FUNCTION
unix_timestamp()RETURNS integer AS 'SELECT current_timestamp()::int4 AS result;
 
' LANGUAGE SQL;

</pre> <small><font face="Arial">The documentation indicates that the arguments are optional, and even shows an example
ofa function with no arguments. How can I create this function?</font></small><br /><div class="moz-signature">-- <br
/><p><fontcolor="#0000ff" face="Comic Sans MS">Michael Eshom<br /> Christian Oldies Fan<br /> Cincinnati,
Ohio</font></div>

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Parallel updates on multiple cores
Следующее
От: "Pavel Stehule"
Дата:
Сообщение: Re: Unable to create function which takes no arguments