Odp: Re: Re: [BUGS] BUG #5035: cast 'text' to 'name' doesnt work in plpgsqlfunction

2009-09-08 Thread Tomasz Karlik
>>> Pavel Stehule 9/7/2009 3:47 PM >>> Hello 2009/9/7 Tomasz Karlik : > > >>>> Alvaro Herrera 9/4/2009 7:23 PM >>> > tkar...@ultimo.pl wrote: > >> Without casting function executes much slower: >> >> CREATE OR REPLAC

Odp: Re: [BUGS] BUG #5035: cast 'text' to 'name' doesnt work in plpgsqlfunction

2009-09-07 Thread Tomasz Karlik
>>> Alvaro Herrera 9/4/2009 7:23 PM >>> tkar...@ultimo.pl wrote: > Without casting function executes much slower: > > CREATE OR REPLACE FUNCTION table_exists(tblname text) RETURNS boolean AS ' > DECLARE > exists boolean; > BEGIN > SELECT 1 INTO exists FROM pg_class WHERE relname = name($1)