From: Roberto Mello <rmello@cc.usu.edu>
To: pgsql-sql@postgresql.org
Subject: extract and variables in PL/pgSQL
Date: Wed, 5 Jun 2002 12:20:54 -0600
Message-ID: <20020605182054.GA1307@cc.usu.edu> (raw)
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? *&^(&^)#@$*&_% NO CARRIER
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: rmello@cc.usu.edu
Subject: Re: extract and variables in PL/pgSQL
In-Reply-To: <20020605182054.GA1307@cc.usu.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox