Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Bug #749: one NULL function parameter makes all other NULL


  • From: pgsql-bugs(at)postgresql(dot)org
  • To: pgsql-bugs(at)postgresql(dot)org
  • Subject: Bug #749: one NULL function parameter makes all other NULL
  • Date: Tue, 27 Aug 2002 10:42:03 -0400 (EDT)
  • Message-id: <20020827144203.EE0F5475D95@postgresql.org> <text/plain>

Laurent HERVE (laurent-herve(at)club-internet(dot)fr) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
one NULL function parameter makes all other NULL

Long Description
I don't know if this is really a bug but it seems like for me and it is very annoying. I checked all release notes of recent releases to find some king of bug fix for that, without sucess.
I know, my postgresql version is a little bit old, but I cannot upgrade know.
But I just want to know if that bug is known and corrected in recent release.
So here it is :

test=# create function foo(date,char(10))
test-# returns integer
test-# as '
test-# declare
test-#         p1 alias for $1;
test-#         p2 alias for $2;
test-# begin
test-#         raise notice ''% %'',p1,p2;
test-#         return (''1'');
test-# end;'
test-# language 'plpgsql';
test-# 
CREATE

test=# select foo('2002-05-02','236');
NOTICE:  2002-05-02 236
 foo
-----
   1
(1 row)

test=# select foo('2002-05-02',NULL);
NOTICE:  <NULL> <NULL>
foo
-----
   1
(1 row)

So why the first parameter became NULL ?

test=# select version();
                           version
-------------------------------------------------------------
 PostgreSQL 7.0.3 on i686-pc-linux-gnu, compiled by gcc 2.96
(1 row)



Sample Code


No file was uploaded with this report




Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group