Wierded error in recursive function; debugging ideas? - Mailing list pgsql-sql

From Josh Berkus
Subject Wierded error in recursive function; debugging ideas?
Date
Msg-id 200408102156.25803.josh@agliodbs.com
Whole thread Raw
Responses Re: Wierded error in recursive function; debugging ideas?
Re: Wierded error in recursive function; debugging ideas?
List pgsql-sql
Folks,

I'm seeing this bizarre, unreproducable error in my logs:

[2] Wrong datatype for second argument in call to in_array
  SQL: SELECT sf_event_decendants(66645,111)

The problem is that it's proven completely impossible to reproduce this error
at test time; it only seems to happen in production, and then only one out of
about 200 times the function is called (although when the function errors it
does seem to error 3-5 times in a row).

sf_event_descendants is a recursive function which maps out which child events
of the current event are visible to the current user.   It does use arrays.
I did try tinkering with some of the functions internals without apparent
effect.

I also checked for in_array and it's not a visible built-in function.  Is this
maybe a PostgreSQL bug?   Version is 7.4.1

--
-Josh Berkus"A developer of Very Little Brain"Aglio Database SolutionsSan Francisco



pgsql-sql by date:

Previous
From: Theo Galanakis
Date:
Subject: Re: ERROR: Cross-database references are not implemented -
Next
From: Joe Conway
Date:
Subject: Re: Wierded error in recursive function; debugging ideas?