| From: | Roberto Mello <rmello(at)cc(dot)usu(dot)edu> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | extract and variables in PL/pgSQL |
| Date: | 2002-06-05 18:20:54 |
| Message-ID: | 20020605182054.GA1307@cc.usu.edu |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
Hi,
Someone in another list asked about this function. I'm not sure why it
doesn't work. What am I missing?
CREATE FUNCTION zastras(timestamp) RETURNS integer AS '
declare
w_temp1 alias for $1;
w_result integer;
begin
SELECT INTO w_result EXTRACT(epoch from timestamp w_temp1);
return w_result;
end;
' language 'plpgsql';
NOTICE: Error occurred while executing PL/pgSQL function zastras
NOTICE: line 5 at select into variables
Thanks,
-Roberto
--
+----| http://fslc.usu.edu/ USU Free Software & GNU/Linux Club |------+
Roberto Mello - Computer Science, USU - http://www.brasileiro.net/
http://www.sdl.usu.edu/ - Space Dynamics Lab, Developer
I wonder what this button does? *&^(&^)#(at)$*&_% NO CARRIER
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Richard Poole | 2002-06-05 18:39:50 | Re: Indexing Metaphone? |
| Previous Message | Josh Berkus | 2002-06-05 18:12:02 | Indexing Metaphone? |