X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 81FFED8469 for ; Tue, 30 Aug 2005 11:02:28 -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 67983-04 for ; Tue, 30 Aug 2005 14:02:26 +0000 (GMT) Received: from window.monsterlabs.com (window.monsterlabs.com [216.183.105.176]) by svr1.postgresql.org (Postfix) with SMTP id 37843D8420 for ; Tue, 30 Aug 2005 11:02:24 -0300 (ADT) Received: (qmail 19735 invoked from network); 30 Aug 2005 14:02:13 -0000 Received: from pcp0012204803pcs.blairblvd.tn.nash.comcast.net (HELO ?192.168.15.110?) (69.245.49.69) by 0 with SMTP; 30 Aug 2005 14:02:13 -0000 In-Reply-To: <43135FA9.3060807@noaa.gov> References: <43135FA9.3060807@noaa.gov> Mime-Version: 1.0 (Apple Message framework v734) Content-Type: text/plain; charset=WINDOWS-1252; delsp=yes; format=flowed Message-Id: <4DADE9CC-4B44-4A9A-A424-E7916937610C@sitening.com> Cc: pgsql-admin@postgresql.org Content-Transfer-Encoding: quoted-printable From: "Thomas F. O'Connell" Subject: Re: sqlstate 02000 while declaring cursor/freeing statement Date: Tue, 30 Aug 2005 09:01:36 -0500 To: andy rost X-Mailer: Apple Mail (2.734) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.018 required=5 tests=[AWL=0.018] X-Spam-Level: X-Archive-Number: 200508/385 X-Sequence-Number: 18704 On Aug 29, 2005, at 2:19 PM, andy rost wrote: > I'm new to the PostgreSQL community so please pardon what is =20 > probably a silly question ... > > I'm in the process of porting Informix ESQL to PostgreSQL. I =20 > occasionally get sqlcode =3D 100 and sqlstate =3D 02000 when declaring = =20 > 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 =3D 100 and sqlca.sqlstate =3D '02000' Andy, According to the docs, a positive value of sqlcode indicates a =20 harmless condition: http://www.postgresql.org/docs/8.0/static/ecpg-errors.html The sqlstate of 02000 looks like the NO DATA code: http://www.postgresql.org/docs/8.0/static/errcodes-appendix.html I don't see anything wrong with your cursor declaration, so this just =20= looks like it's indicating that no rows were returned. -- Thomas F. O'Connell Co-Founder, Information Architect Sitening, LLC Strategic Open Source: Open Your i=99 http://www.sitening.com/ 110 30th Avenue North, Suite 6 Nashville, TN 37203-6320 615-469-5150 615-469-5151 (fax)=