pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sabin Coanda <sabin.coanda@deuromedia.ro>
To: pgsql-sql@postgresql.org
Subject: Re: Aleatory exception - found cause
Date: Fri, 23 Nov 2007 13:42:50 +0200
Message-ID: <fi6ebi$26l$1@news.hub.org> (raw)
References: <fi665u$tv9$1@news.hub.org>
	<fi66cm$171a$1@news.hub.org>

Hi,

Finally I found the cause of the problem.

I found deeper inside my calls, a function which has to return an integer 
column from a RECORD rec variable. The rec is assigned with the following 
statement:
        EXECUTE 'SELECT pk AS "PK" FROM "my_table" WHERE my_where_clause' 
INTO rec.

When my_where_clause is not fulfilled, rec is initialized somehow with null. 
The exception is rised at the end where I call:
        RETURN rec."PK"

Maybe someone can explain this behavior.

TIA,
Sabin 





Message-ID: <fi6ebi$26l$1@news.hub.org>
Permalink:  ../fi6ebi$26l$1@news.hub.org/
Also on:    postgresql.org/message-id/fi6ebi$26l$1@news.hub.org

 · 

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: sabin.coanda@deuromedia.ro
  Subject: Re: Aleatory exception - found cause
  In-Reply-To: <fi6ebi$26l$1@news.hub.org>

* 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