Re: Trouble Accessing Schema-Qualified Table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: bricklen <bricklen(at)gmail(dot)com>
Cc: Jerry Richards <jerry(dot)richards(at)teotech(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Trouble Accessing Schema-Qualified Table
Date: 2010-11-15 17:33:49
Message-ID: 16927.1289842429@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

bricklen <bricklen(at)gmail(dot)com> writes:
> On Mon, Nov 15, 2010 at 8:35 AM, Jerry Richards
> <jerry(dot)richards(at)teotech(dot)com> wrote:
>>
>> teo=# select * from sip_presence('ts_sofia_internal') where
>> sip_presence.sip_user='1003';
>>
>> ERROR: function sip_presence(unknown) does not exist

> The problem isn't the schema name, it is with the parameter you are
> using in your function.

While Jerry didn't say so in so many words, I suppose that the query
worked for him before he changed the search path. In that case the
problem *is* the schema name: his function is in a schema that is no
longer in the search path. He can either qualify the function name:

select * from other_schema.sip_presence('ts_sofia_internal') where

or list both schemas in his search_path so that the function can still
be found without a schema name attached.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vincent Veyron 2010-11-15 17:34:09 Re: Basic Tutorials for 9.0
Previous Message bricklen 2010-11-15 17:01:07 Re: Trouble Accessing Schema-Qualified Table