X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3B2C4D7ED9 for ; Mon, 29 Aug 2005 17:09:43 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 83627-03 for ; Mon, 29 Aug 2005 20:09:40 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id A94ECD7E04 for ; Mon, 29 Aug 2005 17:09:38 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j7TK9Zce023631 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 29 Aug 2005 14:09:38 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j7TK9Zum099440; Mon, 29 Aug 2005 14:09:35 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j7TK9Zmk099439; Mon, 29 Aug 2005 14:09:35 -0600 (MDT) (envelope-from mfuhr) Date: Mon, 29 Aug 2005 14:09:35 -0600 From: Michael Fuhr To: andy rost Cc: pgsql-sql@postgresql.org Subject: Re: sqlstate 02000 while declaring cursor/freeing prepared statements Message-ID: <20050829200935.GA98664@winnie.fuhr.org> References: <431361D8.8050900@noaa.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <431361D8.8050900@noaa.gov> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 required=5 tests=[AWL=0.005] X-Spam-Level: X-Archive-Number: 200508/270 X-Sequence-Number: 22498 On Mon, Aug 29, 2005 at 02:28:24PM -0500, andy rost wrote: > I'm in the process of porting Informix ESQL to PostgreSQL. I > occasionally get sqlcode = 100 and sqlstate = 02000 when declaring > cursors or freeing prepared statements. Is this normal? For example: > > $declare loop1 cursor with hold for > select distinct ( tabname ) > from meta ; > > results in sqlca.sqlcode = 100 and sqlca.sqlstate = '02000' Could you provide a little more context? Are you using ECPG? What version of PostgreSQL are you using? When you say that you "occasionally" see this behavior, do you mean that you see it consistently with some commands and not with others, or do you mean that the same command sometimes does it and sometimes not? Do you have a reproducible test case? That is, everything that somebody could do to reproduce the behavior on their own system? -- Michael Fuhr