[Freeswitch-dev] Trouble Accessing DB Table in C-module Via ODBC

Rupa Schomaker rupa at rupa.com
Mon Nov 15 11:05:49 PST 2010


What database engine?  That looks like postgresql.  If so, add the schema
you are interested in working with into the search path or explicitly use
the schema in your query.

schema.function(args) rather than just function(args)

You can set the search path using alter user ...

On Mon, Nov 15, 2010 at 10:56 AM, Jerry Richards <jerry.richards at teotech.com
> wrote:

> Hello,
>
>
>
> I need to access a database using two different schemas.  During
> initialization the default schema is set as follows:
>
>
>
> set schema 'ucm';
>
>
>
> Then later, I need to get data from a table in another schema
> 'ts_sofia_internal', so I tried the following, but it returns an error as
> shown:
>
>
>
> teo=# select * from sip_presence('ts_sofia_internal') where
> sip_presence.sip_user='1003';
>
> ERROR:  function sip_presence(unknown) does not exist
>
> LINE 1: select * from sip_presence('ts_sofia_internal') where sip_pr...
>
>                       ^
>
> HINT:  No function matches the given name and argument types. You might
> need to add explicit type casts.
>
> teo=#
>
>
>
> Does anyone know how I can do this?  By the way, I will actually implement
> the query in C and connect to the DB via ODBC.
>
>
>
> Thanks,
>
> Jerry
>
>
>
>
>
>
>
> _______________________________________________
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
>


-- 
-Rupa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20101115/8cd0693a/attachment.html 


More information about the FreeSWITCH-dev mailing list