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

pl/pgsql oddity



Hello everyone,

When writing some serverside code I ran into an oddity that I
managed to boil down to this:

-------------------------------------------------------
create or replace function fubar() returns varchar as '
declare
  l integer;
begin
  l = 38;
  if l < 38 then
    return ''< 38'';
  elseif l >= 38 then
    return ''>= 38'';
  else
    return ''this is not possible'';
  end if;
end;'
language 'plpgsql';
-------------------------------------------------------

But I can't understand or solve it. The function always returns
'this is not possible'. Can someone tell me what I'm overlooking?
Thanks!




Home | Main Index | Thread Index

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