Re: Aleatory exception - found cause - Mailing list pgsql-sql

From Sabin Coanda
Subject Re: Aleatory exception - found cause
Date
Msg-id fi6ebi$26l$1@news.hub.org
Whole thread Raw
In response to Aleatory exception  ("Sabin Coanda" <sabin.coanda@deuromedia.ro>)
List pgsql-sql
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 




pgsql-sql by date:

Previous
From: Martin Marques
Date:
Subject: Re: PL argument max size, and doubt
Next
From: Louis-David Mitterrand
Date:
Subject: Re: dynmic column names inside trigger?