X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5F1FB14B281A for ; Wed, 11 Aug 2004 01:56:13 -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 27950-06 for ; Wed, 11 Aug 2004 04:56:09 +0000 (GMT) Received: from davinci.ethosmedia.com (server226.ethosmedia.com [209.128.84.226]) by svr1.postgresql.org (Postfix) with ESMTP id A939914B2804 for ; Wed, 11 Aug 2004 01:56:07 -0300 (ADT) Received: from [64.81.245.111] (HELO temoku.sf.agliodbs.com) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 6047126; Tue, 10 Aug 2004 21:57:21 -0700 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: pgsql-sql@postgresql.org Subject: Wierded error in recursive function; debugging ideas? Date: Tue, 10 Aug 2004 21:56:25 -0700 User-Agent: KMail/1.5.4 Cc: mail@joeconway.com MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200408102156.25803.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/78 X-Sequence-Number: 18575 Folks, I'm seeing this bizarre, unreproducable error in my logs: [2] Wrong datatype for second argument in call to in_array =A0 SQL: SELECT sf_event_decendants(66645,111) The problem is that it's proven completely impossible to reproduce this err= or=20 at test time; it only seems to happen in production, and then only one out = of=20 about 200 times the function is called (although when the function errors i= t=20 does seem to error 3-5 times in a row). sf_event_descendants is a recursive function which maps out which child eve= nts=20 of the current event are visible to the current user. It does use arrays.= =20=20 I did try tinkering with some of the functions internals without apparent= =20 effect. I also checked for in_array and it's not a visible built-in function. Is t= his=20 maybe a PostgreSQL bug? Version is 7.4.1 --=20 -Josh Berkus "A developer of Very Little Brain" Aglio Database Solutions San Francisco