Wierded error in recursive function; debugging ideas?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Cc: mail(at)joeconway(dot)com
Subject: Wierded error in recursive function; debugging ideas?
Date: 2004-08-11 04:56:25
Message-ID: 200408102156.25803.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Solutions
San Francisco

Responses

Browse pgsql-sql by date

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