Re: Clearing plans

From: Scott Ribe <scott_ribe(at)killerbytes(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: "pgsql-general postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Clearing plans
Date: 2007-01-19 20:35:26
Message-ID: C1D6799E.606E6%scott_ribe@killerbytes.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> d'oh! that was just a transcription error though...if you create f()
> returning bigint and immutable it produces the same results.

So I see. But...

pedcard=# create function f2() returns boolean as $$ begin return 't'; end;
$$ language plpgsql immutable;
CREATE FUNCTION

pedcard=# create function f3() returns varchar as $$ begin if (select f2() =
't') then return 'yes'; else return 'no'; end if; end; $$ language plpgsql;
CREATE FUNCTION

pedcard=# select f3();
f3
-----
yes
(1 row)

pedcard=# create or replace function f2() returns boolean as $$ begin return
'f'; end; $$ language plpgsql immutable;
CREATE FUNCTION

pedcard=# select f3();
f3
-----
yes
(1 row)

--
Scott Ribe
scott_ribe(at)killerbytes(dot)com
http://www.killerbytes.com/
(303) 722-0567 voice

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dianne Yumul 2007-01-19 20:52:42 Postgresql 8.0.10 on FC4
Previous Message Jan Muszynski 2007-01-19 20:22:12 Multiple column index question.