Thread: Question #4 about PL/PGSQL
Folks, Oh, yes, one more: 4. If I pass a NULL to any of the parameters of a PL/PGSQL function, any (other) VARCHAR parameters are set to NULL as well. Thanks! -Josh
"Josh Berkus" <josh@agliodbs.com> writes: > 4. If I pass a NULL to any of the parameters of a PL/PGSQL > function, any (other) VARCHAR parameters are set to NULL as > well. Not only varchar --- any other parameters, period. And not only that, but the result is taken as NULL no matter what you try to return. This is a longstanding deficiency that is fixed by the new function manager in 7.1. regards, tom lane
Tom, > Not only varchar --- any other parameters, period. And > not only that, > but the result is taken as NULL no matter what you try to > return. Not quite. I tried the following: Parameters: $1=integer, $2=NULL, $3=varchar And I had the function test for nulls. It read the first parameter, but not $3. It did return the string telling me it had found nulls, however. > This is a longstanding deficiency that is fixed by the > new function > manager in 7.1. Damn! When is the "holy grail" of PostgreSQL going to be stable enough to use? Beta3 still has a "not advisable for production" warning, and I'm being tied up in knots by the number of things I need in 7.1. Would it help if I sent more money? :-) -Josh
Tom, > Damn! When is the "holy grail" of PostgreSQL going to be > stable enough to use? Beta3 still has a "not advisable > for > production" warning, and I'm being tied up in knots by > the > number of things I need in 7.1. Ooops! That may have sounded a little harsh. I am a bit desperate, but that's hardly your fault. Thank you so much for all of your hard work as our "database engine" guru, and for staying up late to answer our questions! -Josh
Josh Berkus wrote: > Folks, > > Oh, yes, one more: > > 4. If I pass a NULL to any of the parameters of a PL/PGSQL > function, any (other) VARCHAR parameters are set to NULL as > well. Fixed in 7.1. Impossible to fix in 7.0.x or earlier due to missing capabilities of the function manager. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com # _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com