Re: BUG #5035: cast 'text' to 'name' doesnt work in plpgsql function - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5035: cast 'text' to 'name' doesnt work in plpgsql function
Date
Msg-id 16769.1252087498@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #5035: cast 'text' to 'name' doesnt work in plpgsql function  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-bugs
Alvaro Herrera <alvherre@commandprompt.com> writes:
> tkarlik@ultimo.pl wrote:
>> Without casting function executes much slower:

> If you're looking for a speedy answer, try a SQL function, not plpgsql.

He's still going to need the cast to name.  It's not a bug, it's just
how things work: the indexes on pg_class support name = name equality
tests, not text = text.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Sam Mason
Date:
Subject: Re: BUG #5028: CASE returns ELSE value always when type is "char"
Next
From: "Kevin Grittner"
Date:
Subject: Re: BUG #5028: CASE returns ELSE value always when type is "char"