X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 7C2D3D1B533 for ; Fri, 12 Sep 2003 02:46:59 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 65003-09 for ; Thu, 11 Sep 2003 23:46:31 -0300 (ADT) Received: from megazone.bigpanda.com (45.mufb.snfc.sffca01r18.dsl.att.net [12.103.249.45]) by svr1.postgresql.org (Postfix) with ESMTP id 5D3E0D1B500 for ; Thu, 11 Sep 2003 23:46:27 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id C0206D65D; Thu, 11 Sep 2003 19:46:28 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id B5AF55B9D; Thu, 11 Sep 2003 19:46:28 -0700 (PDT) Date: Thu, 11 Sep 2003 19:46:28 -0700 (PDT) From: Stephan Szabo To: Richard Sydney-Smith Cc: Subject: Re: How do I replace select ... into commands? In-Reply-To: <001501c378d6$3aa78f20$df6c32d2@athlon2000> Message-ID: <20030911194512.Q47864-100000@megazone.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/90 X-Sequence-Number: 15068 On Fri, 12 Sep 2003, Richard Sydney-Smith wrote: > I have a number of sybase procedures in which I use something like > > declare > mx : integer; > begin > select max(field) from table into mx; > return mx; > end; > > Postgresql is telling me that select...into has not been implemented > yet. what is the best way to perform this action with the commands > offered in plpgsql? Something like the above should work, what's the exact function and error message and what version are you using?