Re: BUG #5035: cast 'text' to 'name' doesnt work in plpgsql function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: tkarlik(at)ultimo(dot)pl, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5035: cast 'text' to 'name' doesnt work in plpgsql function
Date: 2009-09-04 18:04:58
Message-ID: 16769.1252087498@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> tkarlik(at)ultimo(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Kevin Grittner 2009-09-04 19:01:07 Re: BUG #5028: CASE returns ELSE value always when type is "char"
Previous Message Sam Mason 2009-09-04 17:59:34 Re: BUG #5028: CASE returns ELSE value always when type is "char"