Kevin,
> CREATE FUNCTION java_date( bigint ) RETURNS text AS '
> select to_char(\'epoch\'::datetime + \'$1 seconds\'::interval,
> \'dd/mm/yyyy hh:mi\') as RESULT
> '
> LANGUAGE 'sql';
Try this instead:
CREATE FUNCTION java_date( bigint ) RETURNS text AS ' select to_char(''epoch''::datetime + (CAST($1
ASVARCHAR) || ''seconds'')::interval, ''dd/mm/yyyy hh:mi'') as RESULT
'
LANGUAGE 'sql';
Got it? Check, though, a "CAST (bigint as varchar)" may or may notwork.
-Josh
______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete
informationtechnology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small
businesses fax 621-2533 and non-profit organizations. San Francisco