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
Re: Unable to create function which takes no arguments Re: Unable to create function which takes no arguments |
Список | 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 по дате отправления: