Unable to create function which takes no arguments - Mailing list pgsql-sql

From Michael Eshom
Subject Unable to create function which takes no arguments
Date
Msg-id 484D54E0.4070203@oldiesmann.us
Whole thread Raw
Responses 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>)
List 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 by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Parallel updates on multiple cores
Next
From: "Pavel Stehule"
Date:
Subject: Re: Unable to create function which takes no arguments