8.0.0 beta 2, void type

Started by Nick Hajekover 21 years ago3 messagesgeneral
Jump to latest
#1Nick Hajek
nhajek@vishay.com

I have moved a DB from 7.4.3 to 8.0.0b2 for testing and am
experiencing some
problems with the void type within pl functions. I am calling a
function which
returns a void from within another function and have defined a
variable of type
void to catch the returned value. This worked fine in 7.4.x but
when executed
in 8 generates a "variable has pseudo-type void" error. Is this
a bug or a
change in functionality? Is there a workaround short of
rewritting all
functions to return a non-void value?

thanks,

Nick

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Nick Hajek (#1)
Re: 8.0.0 beta 2, void type

"Nick Hajek" <nhajek@vishay.com> writes:

I have moved a DB from 7.4.3 to 8.0.0b2 for testing and am
experiencing some problems with the void type within pl functions.
I am calling a function which returns a void from within another
function and have defined a variable of type void to catch the
returned value.

Er, why would you want to catch a void return value? Seems like
you ought to use a PERFORM statement.

regards, tom lane

#3Nick Hajek
nhajek@vishay.com
In reply to: Nick Hajek (#1)
Re: 8.0.0 beta 2, void type

I have moved a DB from 7.4.3 to 8.0.0b2 for testing and am
experiencing some problems with the void type within pl functions.
I am calling a function which returns a void from within another
function and have defined a variable of type void to catch the
returned value.

Er, why would you want to catch a void return value? Seems like
you ought to use a PERFORM statement.

regards, tom lane

I didn't know about PERFORM so was just doing what I discovered would work.
Thanks for the tip.

Nick