Re: [SQL] Unable to create function which takes no arguments

2008-06-09 Thread Mark Roberts
IIRC, current_timestamp doesn't require parens. You could try something like this: select extract(epoch from current_timestamp)::int4 as result; -Mark On Mon, 2008-06-09 at 12:05 -0400, Michael Eshom wrote: > I am a project manager for a popular forum system. We are adding > support for PostgreS

Re: [SQL] Unable to create function which takes no arguments

2008-06-09 Thread hubert depesz lubaczewski
On Mon, Jun 09, 2008 at 12:05:52PM -0400, Michael Eshom wrote: > I am trying to create a "UNIX_TIMESTAMP()" function in PostgreSQL, which > will return the current timestamp. However, whenever I try to add this > function in phpPgAdmin, it says 'Syntax error at or near ")" at > character 28'. y

Re: [SQL] Unable to create function which takes no arguments

2008-06-09 Thread Pavel Stehule
Hello current_timestamp is some more than less constant :) try, please postgres=# select extract(epoch from current_timestamp); date_part -- 1213030028.17068 (1 row) or postgres=# select extract(epoch from current_timestamp)::int; date_part 1213030113 (1 row)

[SQL] Unable to create function which takes no arguments

2008-06-09 Thread Michael Eshom
I am a project manager for a popular forum system. We are adding support for PostgreSQL in the next version (which is currently in beta), and have added several PostgreSQL functions to emulate MySQL functions of the same name. I am trying to create a "UNIX_TIMESTAMP()" function in PostgreSQL,