X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id CA195D1B510 for ; Mon, 20 Oct 2003 21:31:08 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 13676-06 for ; Mon, 20 Oct 2003 18:30:40 -0300 (ADT) Received: from davinci.ethosmedia.com (unknown [209.128.84.228]) by svr1.postgresql.org (Postfix) with ESMTP id E34A4D1B523 for ; Mon, 20 Oct 2003 18:30:37 -0300 (ADT) Received: from [66.219.92.2] (HELO temoku) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 3797773; Mon, 20 Oct 2003 14:31:18 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: "Clint Stotesbery" , pgsql-sql@postgresql.org Subject: Re: converting an oracle procedure to postgres Date: Mon, 20 Oct 2003 14:28:24 -0700 User-Agent: KMail/1.4.3 References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200310201428.24871.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/260 X-Sequence-Number: 15660 Clint, > v_taxstatus varchar(1); > v_shipping varchar(12); Drop the varchar limits, it's not supported inside PL/pgSQL. > I know I have to relpace the word PROCEDURE with FUNCTION but then it wan= ts=20 > me to put RETURNS but I don't want to return anything. I was= =20 > thinking that I could just have it return integer and then after the last= =20 > update statement put return 0. I'd rather not have it return a junk value= =20 > though. What should I do? I generally return integer or boolean for such functions. For example, you= =20 can have it return "TRUE" at the end, and then your client code can interpr= et=20 any non-true result (Error message, null) as an error. --=20 -Josh Berkus Aglio Database Solutions San Francisco