strange query plans, won't use index - Mailing list pgsql-general

From Dustin Sallings
Subject strange query plans, won't use index
Date
Msg-id Pine.SGI.3.95.981111093506.16940A-100000@bleu.west.spy.net
Whole thread Raw
List pgsql-general
        Does anybody know where there is a difference here:

photo=> explain select cat from wwwacl where userid=getwwwuser('dustin');
NOTICE:  QUERY PLAN:

Seq Scan on wwwacl  (cost=2.65 size=5 width=4)

EXPLAIN
photo=> explain select cat from wwwacl where userid=6;
NOTICE:  QUERY PLAN:

Index Scan using acl_byid on wwwacl  (cost=2.24 size=5 width=4)

EXPLAIN

        getwwwuser('dustin') returns 6 here.


--
SA, beyond.com           My girlfriend asked me which one I like better.
pub  1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net>
|    Key fingerprint =  87 02 57 08 02 D0 DA D6  C8 0F 3E 65 51 98 D8 BE
L_______________________ I hope the answer won't upset her. ____________


pgsql-general by date:

Previous
From: "Gene Selkov Jr."
Date:
Subject: Re: [INTERFACES] need information about storing methods
Next
From: Ulf Mehlig
Date:
Subject: fmgr.h not found