Thread: search_path problem

search_path problem

From
Rory Campbell-Lange
Date:
Hi

I'm trying to set a search path through a connection made by PHP and
failing.

It works in pgsql:

    clwcms=> set search_path = myname, funcs, public

    clwcms=> select * from fn_usr30_show_section_users(1, 1);
     sectionid | personid
    -----------+----------
            10 |        2
            10 |        3
            11 |        1
             1 |        1
             3 |        1
             2 |        1
    (6 rows)

    \df fn_*

         Result data type     | Schema |            Name             |                                Argument data
types                                 

-------------------------+--------+-----------------------------+------------------------------------------------------------------------------------
     setof sec_sections_users | funcs  | fn_usr30_show_section_users | integer, integer
     setof sec_users          | funcs  | fn_usr31_show_users         | integer
     setof sec_sections       | funcs  | fn_usr32_show_sections      | integer
     setof sec_people         | funcs  | fn_usr33_show_people        | integer


I'm now trying to this in php4 and postgres 7.4.3:

1.
SELECT fn_util01_searchpath( DB_SEARCHPATH ) as result;
2.
select * from fn_usr30_show_section_users(1, 1);

I get "ERROR:  column "db_searchpath" does not exist".
The logs show:
2004-09-02 12:44:47 [18952] ERROR:  42703: column "db_searchpath" does not exist
LOCATION:  transformColumnRef, parse_expr.c:1034

Any help would be much appreciated!

Thanks
Rory
--
Rory Campbell-Lange
<rory@campbell-lange.net>
<www.campbell-lange.net>

Re: search_path problem

From
Rory Campbell-Lange
Date:
On 02/09/04, Rory Campbell-Lange (rory@campbell-lange.net) wrote:
> I'm trying to set a search path through a connection made by PHP and
> failing.

> I get "ERROR:  column "db_searchpath" does not exist".

Ag. My test environment was sending through some garbage. Sorry -- all
working fine now.

Thanks,
Rory

--
Rory Campbell-Lange
<rory@campbell-lange.net>
<www.campbell-lange.net>

Re: search_path problem

From
Richard Huxton
Date:
Rory Campbell-Lange wrote:
> Hi
>
> I'm trying to set a search path through a connection made by PHP and
> failing.
>
> It works in pgsql:
>
>     clwcms=> set search_path = myname, funcs, public

> I'm now trying to this in php4 and postgres 7.4.3:
>
> 1.
> SELECT fn_util01_searchpath( DB_SEARCHPATH ) as result;
> 2.
> select * from fn_usr30_show_section_users(1, 1);
>
> I get "ERROR:  column "db_searchpath" does not exist".
> The logs show:
> 2004-09-02 12:44:47 [18952] ERROR:  42703: column "db_searchpath" does not exist
> LOCATION:  transformColumnRef, parse_expr.c:1034

Three questions:
1. What is fn_util01_searchpath()?
2. What is "DB_SEARCHPATH"?
3. Where is your "set search_path..." statement?
--
   Richard Huxton
   Archonet Ltd