
hi,

i have a problem with selecting function :

db=# select auxilium.exists('arx.mods', 'r');
 exists
--------
 t
(1 row)

db=# select exists('arx.mods', 'r');
ERROR:  syntax error at or near "'arx.mods'" at character 15
db=# show search_path;
        search_path
---------------------------
 auxilium, pg_catalog, arx
(1 row)

why i have to  give  namespace name, when i have it already in search_path
?

(its in pg 7.4.3 and 8.0)

thanks


Fri, 20 Aug 2004 12:29:32 +0200 (CEST)
ivan <iv@psycho.pl>
select function & search_path problem/bug?
ivan wrote:
> hi,
> 
> i have a problem with selecting function :
> 
> db=# select auxilium.exists('arx.mods', 'r');
>  exists
> --------
>  t
> (1 row)
> 
> db=# select exists('arx.mods', 'r');
> ERROR:  syntax error at or near "'arx.mods'" at character 15

I believe the problem here is that exists is a reserved word (as in 
SELECT ... FROM ... WHERE EXISTS ...)

I think you should be ok if you quote your function name
   SELECT "exists"(...)
Personally, I'd change it's name.

-- 
   Richard Huxton
   Archonet Ltd

Fri, 20 Aug 2004 11:39:02 +0100
Richard Huxton <dev@archonet.com>
Re: select function & search_path problem/bug?