pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
All function parameters become NULL if one is? 2+ messages / 2 participants [nested] [flat]
* All function parameters become NULL if one is? @ 2000-09-16 22:47 Joel Burton <jburton@scw.org> 2000-09-17 20:37 ` Re: All function parameters become NULL if one is? Peter Eisentraut <peter_e@gmx.net> 0 siblings, 1 reply; 2+ messages in thread From: Joel Burton @ 2000-09-16 22:47 UTC (permalink / raw) To: pgsql-general@postgreSQL.org; pgsql-sql I have a function that takes two text parameters. If both of these are non-null, everything works fine. However, if one of these two parameters is null and one is not, the function receives both as null. CREATE FUNCTION F(TEXT,TEXT) RETURNS TEXT AS ' BEGIN RETURN $2; END; ' LANGUAGE 'plpgsql'; SELECT F(null,'Hello'); returns null. Is this intentional? Is there a way around this? -- Joel Burton, Director of Information Systems -*- jburton@scw.org Support Center of Washington (www.scw.org) ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: All function parameters become NULL if one is? 2000-09-16 22:47 All function parameters become NULL if one is? Joel Burton <jburton@scw.org> @ 2000-09-17 20:37 ` Peter Eisentraut <peter_e@gmx.net> 0 siblings, 0 replies; 2+ messages in thread From: Peter Eisentraut @ 2000-09-17 20:37 UTC (permalink / raw) To: Joel Burton <jburton@scw.org>; +Cc: pgsql-general@postgreSQL.org; pgsql-sql Joel Burton writes: > I have a function that takes two text parameters. If both of these > are non-null, everything works fine. However, if one of these two > parameters is null and one is not, the function receives both as null. Worse, no matter what the function does, the return value is also null. > Is this intentional? Is there a way around this? Wait for 7.1. -- Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/ ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2000-09-17 20:37 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2000-09-16 22:47 All function parameters become NULL if one is? Joel Burton <jburton@scw.org> 2000-09-17 20:37 ` Peter Eisentraut <peter_e@gmx.net>
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