pl/pgsql oddity

From: "Joolz" <joolz(at)arbodienst-limburg(dot)nl>
To: pgsql-general(at)postgresql(dot)org
Subject: pl/pgsql oddity
Date: 2004-12-16 09:06:19
Message-ID: 35440.10.0.4.254.1103187979.squirrel@webmail.arbodienst-limburg.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marco Colombo 2004-12-16 09:12:46 Re: Scheduler in Postgres
Previous Message Michael Ben-Nes 2004-12-16 08:26:48 online backup in critical systems