"Derrick Betts" <Derrick@Blue-Axis.com> writes:
> This is the command:
> SELECT EXTRACT(EPOCH FROM TIMESTAMP variable_name) INTO Temp;
You're confusing the EXTRACT function with the notation for a literal
constant of a specific type. The function is just
EXTRACT(EPOCH FROM timestamp-expression)
An example that involves a literal constant could be written either
EXTRACT(EPOCH FROM TIMESTAMP '2004-1-10 00:00:00')
EXTRACT(EPOCH FROM '2004-1-10 00:00:00'::TIMESTAMP)
but when you are dealing with a variable you don't use the TIMESTAMP
decoration, because the parser already knows what datatype the variable
is. So
EXTRACT(EPOCH FROM timestamp-variable)
regards, tom lane