pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: pgsql-sql@postgresql.org
Cc: mail@joeconway.com
Subject: Wierded error in recursive function; debugging ideas?
Date: Tue, 10 Aug 2004 21:56:25 -0700
Message-ID: <200408102156.25803.josh@agliodbs.com> (raw)

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




view thread (5+ messages)  latest in thread

Message-ID: <200408102156.25803.josh@agliodbs.com>
Permalink:  ../200408102156.25803.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200408102156.25803.josh@agliodbs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: josh@agliodbs.com, mail@joeconway.com
  Subject: Re: Wierded error in recursive function; debugging ideas?
  In-Reply-To: <200408102156.25803.josh@agliodbs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox