Re: [GENERAL] Referencing uninitialized variables in plpgsql

2005-02-06 Thread Tom Lane
"Karl O. Pinc" <[EMAIL PROTECTED]> writes: > AFICT, the docs arn't clear when it comes to referencing unitialized > array elements. I assume you get NULL values here as well even > though other array elements may have been given non-NULL values. There is no such thing as an uninitialized array el

Re: [GENERAL] Referencing uninitialized variables in plpgsql

2005-02-06 Thread Karl O. Pinc
On 02/05/2005 10:57:45 PM, John DeSoi wrote: Yes, exactly. If you don't assign a value to a declared pspgsql variable, it is NULL. Thanks, just what I needed. If you are concerned about this, then always assign a value when you declare it. This does not really address my concern. See below. Also

Re: [GENERAL] Referencing uninitialized variables in plpgsql

2005-02-05 Thread John DeSoi
On Feb 5, 2005, at 11:20 PM, Karl O. Pinc wrote: Is this example telling me I get NULL for unitialized references? I don't believe I should count on this behavior unless it's documented, should I? => create or replace function foo() returns int language plpgsql as 'declare a int; b int; begin a :=