On Tue, Oct 18, 2005 at 03:38:54PM -0400, Lane Van Ingen wrote:
> select EXTRACT(EPOCH from TIMESTAMP current_timestamp) - EXTRACT(EPOCH from
> TIMESTAMP updated_time) ::integer
> 
> ERROR:  syntax error at or near "current_timestamp" at character 37

What are you intending "TIMESTAMP" to do?  If you're trying to do
a cast then see "Type Casts" in the documentation for the correct
syntax:

http://www.postgresql.org/docs/8.0/interactive/sql-expressions.html#SQL-SYNTAX-TYPE-CASTS

You might not need a cast at all:

test=> SELECT extract(epoch FROM current_timestamp);
    date_part     
------------------
 1129678734.81522
(1 row)

-- 
Michael Fuhr

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to