Wierded error in recursive function; debugging ideas?

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Wierded error in recursive function; debugging ideas?
Дата
Msg-id 200408102156.25803.josh@agliodbs.com
обсуждение исходный текст
Ответы Re: Wierded error in recursive function; debugging ideas?  (Joe Conway <mail@joeconway.com>)
Re: Wierded error in recursive function; debugging ideas?  (Joe Conway <mail@joeconway.com>)
Список 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 по дате отправления:

Предыдущее
От: Theo Galanakis
Дата:
Сообщение: Re: ERROR: Cross-database references are not implemented -
Следующее
От: Joe Conway
Дата:
Сообщение: Re: Wierded error in recursive function; debugging ideas?