Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 6FCEA47645C for ; Thu, 6 Jun 2002 12:09:15 -0400 (EDT) Received: from brasileiro.net (slxwy.dorms.usu.edu [129.123.236.160]) by postgresql.org (Postfix) with ESMTP id EC203476492 for ; Thu, 6 Jun 2002 12:08:18 -0400 (EDT) Received: from roberto by brasileiro.net with local (Exim 3.35 #1 (Debian)) id 17Fzpu-00041a-00; Thu, 06 Jun 2002 10:10:06 -0600 Date: Thu, 6 Jun 2002 10:10:06 -0600 From: Roberto Mello To: Jan Wieck Cc: pgsql-sql@postgresql.org Subject: Re: extract and variables in PL/pgSQL Message-ID: <20020606161006.GA15097@cc.usu.edu> References: <20020605182054.GA1307@cc.usu.edu> <200206061220.g56CKtO26245@saturn.janwieck.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <200206061220.g56CKtO26245@saturn.janwieck.net> User-Agent: Mutt/1.3.28i X-message-flag: Please consider using an e-mail program other than Outlook. It's insecure. X-Archive-Number: 200206/55 X-Sequence-Number: 8020 On Thu, Jun 06, 2002 at 08:20:55AM -0400, Jan Wieck wrote: > > > > NOTICE: Error occurred while executing PL/pgSQL function zastras > > NOTICE: line 5 at select into variables > > First you're missing the error message, which should read > something like > > ERROR: parser: parse error at or near "$1" > > Doesn't help much here, but it is usually a good idea to > include error messages in reports like this. Sorry Jan, I meant to paste that. > It works if you leave out the keyword "timestamp" writing > > SELECT INTO w_result EXTRACT(epoch from w_temp1); > > because the variable w_temp1 is known to be of type timestamp > already and therefore the a_expr node on the right hand side > of from is valid. Oh, okay. 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 Daddy, why do those people have to use Microsoft Windows?