Skip site navigation (1) Skip section navigation (2)

Re: plpgsql: Debug function?

From: Turbo Fredriksson <turbo(at)bayour(dot)com>
To: Joel Burton <jburton(at)scw(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: plpgsql: Debug function?
Date: 2001-07-25 15:18:31
Message-ID: 87zo9txcjc.fsf@papadoc.bayour.com (view raw or flat)
Thread:
Lists: pgsql-hackers
>>>>> "Joel" == Joel Burton <jburton(at)scw(dot)org> writes:

    Joel> On 25 Jul 2001, Turbo Fredriksson wrote:
    >> Is there a way to debug a PL/pgSQL function? It's behaving very
    >> irradic!

    Joel> It's crude, but you can output debugging statements w/ RAISE
    Joel> NOTICE or catch flawed assumptions by RAISE EXCEPTION.

That's what I've been doing...

The problem is that a 'SELECT INTO ...' in the function don't work, but
the actual SELECT in psql works fine! 

The variable I'm SELECT'ing into don't get initialized...

-- 
 Turbo     __ _     Debian GNU     Unix _IS_ user friendly - it's just 
 ^^^^^    / /(_)_ __  _   ___  __  selective about who its friends are 
         / / | | '_ \| | | \ \/ /   Debian Certified Linux Developer  
  _ /// / /__| | | | | |_| |>  <  Turbo Fredriksson   turbo(at)tripnet(dot)se
  \\\/  \____/_|_| |_|\__,_/_/\_\ Stockholm/Sweden

radar Marxist counter-intelligence 747 Kennedy Serbian CIA NSA SEAL
Team 6 FSF [Hello to all my fans in domestic surveillance] Clinton FBI
Soviet class struggle
[See http://www.aclu.org/echelonwatch/index.html for more about this]

In response to

Responses

pgsql-hackers by date

Next:From: Joel BurtonDate: 2001-07-25 15:25:56
Subject: Re: plpgsql: Debug function?
Previous:From: Joel BurtonDate: 2001-07-25 15:13:34
Subject: Re: plpgsql: Debug function?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group